aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-07-15 18:46:16 -0400
committerJoey Hess <joey@kitenet.net>2011-07-15 18:46:16 -0400
commit4cd2efef8c6aed3adff9bebfcd3db0c0b5c0d272 (patch)
treeb0b614b1382d89b7019b7aba959301366e447645 /IkiWiki
parent87db6fbb79d3141248831db78b0683222942aaec (diff)
downloadikiwiki-4cd2efef8c6aed3adff9bebfcd3db0c0b5c0d272.tar
ikiwiki-4cd2efef8c6aed3adff9bebfcd3db0c0b5c0d272.tar.gz
fix two recently introduced bugs in rename
* rename: Fix logic error that broke renaming pages when the attachment plugin was disabled. * rename: Fix logic error that bypassed the usual pagespec checks.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/rename.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
index aa1081756..8e32d41ae 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
@@ -184,7 +184,7 @@ sub rename_start ($$$$) {
my $held=$attachment &&
IkiWiki::Plugin::attachment->can("is_held_attachment") &&
IkiWiki::Plugin::attachment::is_held_attachment($page);
- if (! defined $held) {
+ if (! $held) {
check_canrename($page, $pagesources{$page}, undef, undef,
$q, $session);
}
@@ -322,7 +322,7 @@ sub sessioncgi ($$) {
my $held=$q->param("attachment") &&
IkiWiki::Plugin::attachment->can("is_held_attachment") &&
IkiWiki::Plugin::attachment::is_held_attachment($src);
- if (defined $held) {
+ if ($held) {
rename($held, IkiWiki::Plugin::attachment::attachment_holding_location($dest));
postrename($session, $src, $dest, $q->param("attachment"))
unless defined $srcfile;