X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/d1d212203c72072d9a42f66c171dc6be83225894..43f2ba5def1ada506fc005b6efab3da88f74930f:/IkiWiki/Plugin/search.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 94b37ca06..751c75ab5 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 (@) { #{{{ @@ -53,7 +56,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();