]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
fix example
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index 0d5e3c078a9c229b409950c1e65eb1affa3787ac..285013e49175c8651055bb53e34e71e44115699c 100644 (file)
@@ -665,9 +665,11 @@ sub commentmoderation ($$) {
 
                                my $page=IkiWiki::dirname($f);
                                my $file="$config{srcdir}/$f";
+                               my $filedir=$config{srcdir};
                                if (! -e $file) {
                                        # old location
                                        $file="$config{wikistatedir}/comments_pending/".$f;
+                                       $filedir="$config{wikistatedir}/comments_pending";
                                }
 
                                if ($action eq 'Accept') {
@@ -682,7 +684,7 @@ sub commentmoderation ($$) {
                                }
 
                                require IkiWiki::Render;
-                               IkiWiki::prune($file);
+                               IkiWiki::prune($file, $filedir);
                        }
                }