X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/cefbe6210f4e89984bb40062e4f9787b7372dd52..344ab0a16b749c44d6d19dbe1a179c8e30ceef31:/IkiWiki/Plugin/search.pm diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index a57a84048..1b5c66716 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -23,6 +23,7 @@ sub import { #{{{ sub getopt () { #{{{ eval q{use Getopt::Long}; + error($@) if $@; Getopt::Long::Configure('pass_through'); GetOptions("estseek=s" => \$config{estseek}); } #}}} @@ -30,7 +31,7 @@ sub getopt () { #{{{ sub checkconfig () { #{{{ foreach my $required (qw(url cgiurl)) { if (! length $config{$required}) { - error("Must specify $required when using the search plugin\n"); + error(sprintf(gettext("Must specify %s when using the search plugin"), $required)); } } } #}}} @@ -54,13 +55,13 @@ sub pagetemplate (@) { #{{{ } #}}} sub delete (@) { #{{{ - debug("cleaning hyperestraier search index"); + debug(gettext("cleaning hyperestraier search index")); estcmd("purge -cl"); estcfg(); } #}}} sub change (@) { #{{{ - debug("updating hyperestraier search index"); + debug(gettext("updating hyperestraier search index")); estcmd("gather -cm -bc -cl -sd", map { Encode::encode_utf8($config{destdir}."/".$_) @@ -73,7 +74,7 @@ sub change (@) { #{{{ sub cgi ($) { #{{{ my $cgi=shift; - if (defined $cgi->param('phrase')) { + if (defined $cgi->param('phrase') || defined $cgi->param("navi")) { # only works for GET requests chdir("$config{wikistatedir}/hyperestraier") || error("chdir: $!"); exec("./".IkiWiki::basename($config{cgiurl})) || error("estseek.cgi failed");