use warnings;
use strict;
-use IkiWiki;
+use IkiWiki 2.00;
sub import { #{{{
hook(type => "getopt", id => "hyperestraier",
debug(gettext("updating hyperestraier search index"));
estcmd("gather -cm -bc -cl -sd",
map {
- Encode::encode_utf8($config{destdir}."/".$_)
- foreach @{$renderedfiles{pagename($_)}};
+ map {
+ Encode::encode_utf8($config{destdir}."/".$_)
+ } @{$renderedfiles{pagename($_)}};
} @_
);
estcfg();
open(TEMPLATE, ">:utf8", $newfile) || error("open $newfile: $!", $cleanup);
print TEMPLATE IkiWiki::misctemplate("search",
"<!--ESTFORM-->\n\n<!--ESTRESULT-->\n\n<!--ESTINFO-->\n\n",
- baseurl => IkiWiki::dirname($config{cgiurl})."/") ||
+ forcebaseurl => IkiWiki::dirname($config{cgiurl})."/") ||
error("write $newfile: $!", $cleanup);
close TEMPLATE || error("save $newfile: $!", $cleanup);
rename($newfile, "$estdir/$cgi.tmpl") ||
foreach (@_) {
print CHILD "$_\n";
}
- close(CHILD) || error("estcmd @params exited nonzero: $?");
+ close(CHILD) || print STDERR "estcmd @params exited nonzero: $?\n";
}
else {
# child