From c225cdad2524a12b998e550b6c0ba7079d164cff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 12 Jun 2010 22:20:22 -0400 Subject: [PATCH] edittemplate: Make silent mode not disable display when the template page does not exist, so it can be easily created. --- IkiWiki/Plugin/edittemplate.pm | 3 ++- debian/changelog | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) 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}); diff --git a/debian/changelog b/debian/changelog index 1d849f558..d607640c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ ikiwiki (3.20100611) UNRELEASED; urgency=low * img: Support hspace and vspace attributes. * editpage: Rename "comments" field to avoid CSS conflict with the comments div. + * edittemplate: Make silent mode not disable display when the template + page does not exist, so it can be easily created. -- Joey Hess Fri, 11 Jun 2010 13:39:15 -0400 -- 2.32.0.93.g670b81a890