X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/6d80bdda7c0cea5fa538733d5ed5c510bb7b1ee1..4cd2efef8c6aed3adff9bebfcd3db0c0b5c0d272:/IkiWiki/Plugin/rename.pm 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;