]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/search.pm
post for Don
[git.ikiwiki.info.git] / IkiWiki / Plugin / search.pm
index b6fca66ffe0f8655486abc414a9e3b952c5667aa..2d8c3d4e16305cf07700ec09553535d08a9aeb57 100644 (file)
@@ -79,10 +79,11 @@ sub estcfg () { #{{{
        my $estdir="$config{wikistatedir}/hyperestraier";
        my $cgi=IkiWiki::basename($config{cgiurl});
        $cgi=~s/\..*$//;
-       open(TEMPLATE, ">$estdir/$cgi.tmpl") ||
+       open(TEMPLATE, ">:utf8", "$estdir/$cgi.tmpl") ||
                error("write $estdir/$cgi.tmpl: $!");
        print TEMPLATE IkiWiki::misctemplate("search", 
-               "<!--ESTFORM-->\n\n<!--ESTRESULT-->\n\n<!--ESTINFO-->\n\n");
+               "<!--ESTFORM-->\n\n<!--ESTRESULT-->\n\n<!--ESTINFO-->\n\n",
+               baseurl => IkiWiki::dirname($config{cgiurl})."/");
        close TEMPLATE;
        open(TEMPLATE, ">$estdir/$cgi.conf") ||
                error("write $estdir/$cgi.conf: $!");
@@ -91,7 +92,7 @@ sub estcfg () { #{{{
        $template->param(
                index => $estdir,
                tmplfile => "$estdir/$cgi.tmpl",
-               destdir => IkiWiki::abs_path($config{destdir}),
+               destdir => abs_path($config{destdir}),
                url => $config{url},
        );
        print TEMPLATE $template->output;