]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
inline: Avoid using %links to test for page existence
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 30 Nov 2009 23:15:33 +0000 (18:15 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 30 Nov 2009 23:15:33 +0000 (18:15 -0500)
%links is populated even for just-deleted pages, so %pagesources
should be used for such tests instead.

IkiWiki/Plugin/inline.pm

index 29729a4147412a3a6d423d0403e6b21f9f80f1b1..93dc0149e7a092a479807095f876a758db11d902 100644 (file)
@@ -359,7 +359,7 @@ sub preprocess_inline (@) {
                                        if ($config{discussion}) {
                                                if ($page !~ /.*\/\Q$config{discussionpage}\E$/ &&
                                                    (length $config{cgiurl} ||
-                                                    exists $links{$page."/".$config{discussionpage}})) {
+                                                    exists $pagesources{$page."/".$config{discussionpage}})) {
                                                        $template->param(have_actions => 1);
                                                        $template->param(discussionlink =>
                                                                htmllink($page,