projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e104499
)
inline: Avoid using %links to test for page existence
author
Joey Hess
<joey@gnu.kitenet.net>
Mon, 30 Nov 2009 23:15:33 +0000
(18:15 -0500)
committer
Joey 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
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/inline.pm
b/IkiWiki/Plugin/inline.pm
index 29729a4147412a3a6d423d0403e6b21f9f80f1b1..93dc0149e7a092a479807095f876a758db11d902 100644
(file)
--- a/
IkiWiki/Plugin/inline.pm
+++ b/
IkiWiki/Plugin/inline.pm
@@
-359,7
+359,7
@@
sub preprocess_inline (@) {
if ($config{discussion}) {
if ($page !~ /.*\/\Q$config{discussionpage}\E$/ &&
(length $config{cgiurl} ||
- exists $
link
s{$page."/".$config{discussionpage}})) {
+ exists $
pagesource
s{$page."/".$config{discussionpage}})) {
$template->param(have_actions => 1);
$template->param(discussionlink =>
htmllink($page,