2008-03-17 16:25:18 +01:00
|
|
|
`edittemplate` replaces its directive with a note like "edittemplate person
|
|
|
|
registered for people/*". It would be nice if this were dependent on
|
|
|
|
a `verbose` parameter and default to off. I don't see the value in it, and by
|
|
|
|
disabling the output, I can keep template registration as close as possible to
|
|
|
|
the action as needed.
|
|
|
|
|
|
|
|
I think this (untested) patch might just do the trick:
|
|
|
|
|
|
|
|
--- a/IkiWiki/Plugin/edittemplate.pm
|
|
|
|
+++ b/IkiWiki/Plugin/edittemplate.pm
|
2008-12-17 21:22:16 +01:00
|
|
|
@@ -46,8 +46,13 @@ sub preprocess (@) {
|
2008-03-17 16:25:18 +01:00
|
|
|
|
|
|
|
$pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};
|
|
|
|
|
|
|
|
- return sprintf(gettext("edittemplate %s registered for %s"),
|
|
|
|
- $params{template}, $params{match});
|
|
|
|
+ if (yesno($params{verbose})) {
|
|
|
|
+ return sprintf(gettext("edittemplate %s registered for %s"),
|
|
|
|
+ $params{template}, $params{match});
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return '';
|
|
|
|
+ }
|
2008-12-17 21:22:16 +01:00
|
|
|
}
|
2008-03-17 16:25:18 +01:00
|
|
|
|
2008-12-17 21:22:16 +01:00
|
|
|
sub formbuilder (@) {
|
2008-03-17 16:25:18 +01:00
|
|
|
|
|
|
|
--[[madduck]]
|
|
|
|
|
2008-07-21 13:31:33 +02:00
|
|
|
[[!tags wishlist patch]]
|
2008-09-21 05:06:03 +02:00
|
|
|
|
|
|
|
[[done]], though the patch I eventually applied uses "silent" as the
|
|
|
|
parameter name. Sorry for forgetting about this patch until someone else
|
|
|
|
implemented it too. --[[Joey]]
|