]> sipb.mit.edu Git - ikiwiki.git/commitdiff
use newpagefile
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 29 Sep 2008 22:52:42 +0000 (18:52 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 29 Sep 2008 22:52:42 +0000 (18:52 -0400)
IkiWiki/Plugin/editpage.pm
IkiWiki/Plugin/rename.pm

index f44e4f857b60ad7d3d56065f27979f1d07e71563..794548c6de933d03f1e2755ae3ad8cdefc2ca8a8 100644 (file)
@@ -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);
                }
index b2c3eedfe075a20b98c57b7e2cd812fcbb7bc276..218cab489b227976c94dd105e0ee8e644b4a60d5 100644 (file)
@@ -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,