X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3697a684df0f9bf931fafb3cd7766753b47c1970..338e49df1533e09a8ba3f1225f75a2bf4deaf4a8:/IkiWiki/Plugin/search.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 78eb750b5..3f0b7c9ad 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -227,20 +227,21 @@ sub setupfiles () { "database_dir .\n". "template_dir ./templates\n"); - # Avoid omega interpreting anything in the misctemplate + # Avoid omega interpreting anything in the cgitemplate # as an omegascript command. - my $misctemplate=IkiWiki::misctemplate(gettext("search"), "\0", + eval q{use IkiWiki::CGI}; + my $template=IkiWiki::cgitemplate(undef, gettext("search"), "\0", searchform => "", # avoid showing the small search form ); eval q{use HTML::Entities}; error $@ if $@; - $misctemplate=encode_entities($misctemplate, '\$'); + $template=encode_entities($template, '\$'); my $querytemplate=readfile(IkiWiki::template_file("searchquery.tmpl")); - $misctemplate=~s/\0/$querytemplate/; + $template=~s/\0/$querytemplate/; writefile("query", $config{wikistatedir}."/xapian/templates", - $misctemplate); + $template); $setup=1; } }