summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/edittemplate.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-06-12 22:20:22 -0400
committerJoey Hess <joey@kitenet.net>2010-06-12 22:20:22 -0400
commitc225cdad2524a12b998e550b6c0ba7079d164cff (patch)
tree45f2ce4e2e8df3b23dcabf1faf8cc07fc64c4df4 /IkiWiki/Plugin/edittemplate.pm
parent31fa7714e7a3eba6e34b601426047f2aa2f8db01 (diff)
edittemplate: Make silent mode not disable display when the template page does not exist, so it can be easily created.
Diffstat (limited to 'IkiWiki/Plugin/edittemplate.pm')
-rw-r--r--IkiWiki/Plugin/edittemplate.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm
index d65072010..742413c94 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
@@ -59,8 +59,9 @@ sub preprocess (@) {
my $bestlink=bestlink($params{page}, $link);
$pagestate{$params{page}}{edittemplate}{$params{match}}=$bestlink;
- return "" if ($params{silent} && IkiWiki::yesno($params{silent}));
add_depends($params{page}, $link, deptype("presence"));
+ return "" if ($params{silent} && IkiWiki::yesno($params{silent})) &&
+ length $bestlink;
return sprintf(gettext("edittemplate %s registered for %s"),
htmllink($params{page}, $params{destpage}, $link),
$params{match});