]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/autoindex.pm
Merge commit 'upstream/master' into prv/po
[git.ikiwiki.info.git] / IkiWiki / Plugin / autoindex.pm
index 6ff06538f3a17d1a723d8384cd20d760a4bd167f..d1b3edb1f3cb6394d6bda558aed507fee627b4c3 100644 (file)
@@ -21,7 +21,7 @@ sub getsetup () { #{{{
 
 sub genindex ($) { #{{{
        my $page=shift;
-       my $file=$page.".".$config{default_pageext};
+       my $file=newpagefile($page, $config{default_pageext});
        my $template=template("autoindex.tmpl");
        $template->param(page => $page);
        writefile($file, $config{srcdir}, $template->output);
@@ -97,7 +97,9 @@ sub refresh () { #{{{
                if ($config{rcs}) {
                        IkiWiki::disable_commit_hook();
                }
-               genindex($_) foreach @needed;
+               foreach my $page (@needed) {
+                       genindex($page);
+               }
                if ($config{rcs}) {
                        IkiWiki::rcs_commit_staged(
                                gettext("automatic index generation"),