X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/20eacc2c1f74d0ab617dca36378a35920e313a23..bd70136ca1b073e1208f6562c05ceadb44633024:/IkiWiki/Plugin/search.pm diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 8931e3fd4..c8e0dd580 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -27,21 +27,21 @@ sub checkconfig () { #{{{ } } #}}} -sub pagetemplate ($$) { #{{{ - my $page=shift; - my $template=shift; +my $form; +sub pagetemplate (@) { #{{{ + my %params=@_; + my $page=$params{page}; + my $template=$params{template}; # Add search box to page header. if ($template->query(name => "searchform")) { - $template->param(searchform => qq{ -
-
- - - -
-
-}); + if (! defined $form) { + my $searchform = IkiWiki::template("searchform.tmpl", blind_cache => 1); + $searchform->param(searchaction => $IkiWiki::config{cgiurl}); + $form=$searchform->output; + } + + $template->param(searchform => $form); } } #}}} @@ -55,7 +55,7 @@ sub change (@) { #{{{ IkiWiki::debug("updating hyperestraier search index"); IkiWiki::estcmd("gather -cm -bc -cl -sd", map { - $IkiWiki::config{destdir}."/".$IkiWiki::renderedfiles{IkiWiki::pagename($_)} + Encode::encode_utf8($IkiWiki::config{destdir}."/".$IkiWiki::renderedfiles{IkiWiki::pagename($_)}) } @_ ); IkiWiki::estcfg();