diff options
author | Joey Hess <joey@kitenet.net> | 2010-04-24 20:22:20 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-04-24 20:22:20 -0400 |
commit | ca9c6cc254d934837406ef9bb0dc5d021983661b (patch) | |
tree | 4e9e9edcbcee0227e550c6674167b010fe82acd1 /IkiWiki/Plugin/search.pm | |
parent | 0d8fc55d3356ea7da2ce175d25230d207bd32088 (diff) |
add support for mass dependencies
Registered by passing "" as page name to add_depends.
Diffstat (limited to 'IkiWiki/Plugin/search.pm')
-rw-r--r-- | IkiWiki/Plugin/search.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 55edf8752..c9a69f443 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -41,6 +41,10 @@ sub checkconfig () { if (! defined $config{omega_cgi}) { $config{omega_cgi}="/usr/lib/cgi-bin/omega/omega"; } + + # This is a mass dependency, so if the search form template + # changes, every page is rebuilt. + add_depends("", "searchform.tmpl"); } my $form; @@ -52,7 +56,7 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template_depends("searchform.tmpl", $page, blind_cache => 1); + my $searchform = template("searchform.tmpl", blind_cache => 1); $searchform->param(searchaction => $config{cgiurl}); $form=$searchform->output; } |