]> sipb.mit.edu Git - ikiwiki.git/commitdiff
support indexpages when renaming pages
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 29 Sep 2008 22:29:53 +0000 (18:29 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 29 Sep 2008 22:29:53 +0000 (18:29 -0400)
Note that the page filename code used here and in editpage are identical..

IkiWiki/Plugin/rename.pm

index 3ee457ff09e0d8bc7ff4b24e21cc8e6077839294..b2c3eedfe075a20b98c57b7e2cd812fcbb7bc276 100644 (file)
@@ -279,7 +279,12 @@ sub sessioncgi ($$) { #{{{
                                        $type=$ext;
                                }
                                
                                        $type=$ext;
                                }
                                
-                               $destfile.=".".$type;
+                               if (! $config{indexpages}) {
+                                       $destfile.=".".$type;
+                               }
+                               else {
+                                       $destfile.="/index.".$type;
+                               }
                        }
                        push @torename, {
                                src => $src,
                        }
                        push @torename, {
                                src => $src,