X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/dea23a1031b55dbc408e9f99c761fd667331cccd..4895955ceaf264c5f17b10c4009e1ab1afcc55ee:/IkiWiki/Plugin/search.pm diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index c79d40469..c8e0dd580 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -27,6 +27,7 @@ sub checkconfig () { #{{{ } } #}}} +my $form; sub pagetemplate (@) { #{{{ my %params=@_; my $page=$params{page}; @@ -34,15 +35,13 @@ sub pagetemplate (@) { #{{{ # 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); } } #}}} @@ -56,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();