X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/5466a1daf99e8e4c67a19f871aaf558312569652..409e62021c5c05e0184a61d0692697c10a0b8283:/IkiWiki/Plugin/search.pm diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index c94974ac4..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 (@) { #{{{ @@ -87,9 +90,7 @@ sub estcfg () { #{{{ close TEMPLATE; open(TEMPLATE, ">$estdir/$cgi.conf") || error("write $estdir/$cgi.conf: $!"); - my $template=HTML::Template->new( - filename => "$config{templatedir}/estseek.conf" - ); + my $template=template("estseek.conf"); eval q{use Cwd 'abs_path'}; $template->param( index => $estdir,