X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/d1d212203c72072d9a42f66c171dc6be83225894..26c2c63c97e6bfa704357503fdfd8d8834838851:/IkiWiki/Plugin/search.pm diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 94b37ca06..c79d40469 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -27,12 +27,14 @@ sub checkconfig () { #{{{ } } #}}} -sub pagetemplate ($$) { #{{{ - my $page=shift; - my $template=shift; +sub pagetemplate (@) { #{{{ + my %params=@_; + my $page=$params{page}; + my $template=$params{template}; # Add search box to page header. - $template->param(searchform => qq{ + if ($template->query(name => "searchform")) { + $template->param(searchform => qq{
@@ -41,6 +43,7 @@ sub pagetemplate ($$) { #{{{
}); + } } #}}} sub delete (@) { #{{{