]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/search.pm
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[git.ikiwiki.info.git] / IkiWiki / Plugin / search.pm
index 55edf8752a8e04c4abbe9e320f36922ad13b0884..9e875c79cc6008e4a5bca4d294a659e2fac21acd 100644 (file)
@@ -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("", "templates/searchform.tmpl");
 }
 
 my $form;
@@ -52,8 +56,9 @@ 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});
+                       $searchform->param(html5 => $config{html5});
                        $form=$searchform->output;
                }