From: Joey Hess Date: Mon, 29 Sep 2008 22:52:42 +0000 (-0400) Subject: use newpagefile X-Git-Tag: 2.66~34^2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2ba168ac8357ad76de246d656b3da15bc9c0e722;p=ikiwiki.git use newpagefile --- diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index f44e4f857..794548c6d 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -156,12 +156,7 @@ sub cgi_editpage ($$) { #{{{ $type=pagetype($pagesources{$from}); } $type=$config{default_pageext} unless defined $type; - if (! $config{indexpages}) { - $file=$page.".".$type; - } - else { - $file=$page."/index.".$type; - } + $file=newpagefile($page, $type); if (! $form->submitted) { $form->field(name => "rcsinfo", value => "", force => 1); } diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index b2c3eedfe..218cab489 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -279,12 +279,7 @@ sub sessioncgi ($$) { #{{{ $type=$ext; } - if (! $config{indexpages}) { - $destfile.=".".$type; - } - else { - $destfile.="/index.".$type; - } + $destfile=newpagefile($dest, $type); } push @torename, { src => $src,