diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-29 22:21:23 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-29 22:21:23 +0000 |
commit | 0d9539d577886549b51d2bf70167db05f3f2514c (patch) | |
tree | 008251aa2b1c5f3f5cb30ec122f2751cda8f3b00 /IkiWiki/CGI.pm | |
parent | a4eaf056202dc87ab529896cafac082eb987d525 (diff) |
added --hyperestraier switch, which turns on search support
(ok, the way I run estseek.cgi is admittedly pretty nasty, but it works..)
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r-- | IkiWiki/CGI.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index f360b6778..08d796142 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -475,12 +475,22 @@ sub cgi_editpage ($$) { #{{{ } } #}}} +sub cgi_hyperestraier () { #{{{ + # only works for GET requests + chdir("$config{wikistatedir}/hyperestraier") || error("chdir: $!"); + exec("./".basename($config{cgiurl})) || error("estseek.cgi failed"); +} #}}} + sub cgi () { #{{{ eval q{use CGI}; eval q{use CGI::Session}; my $q=CGI->new; + if (defined $q->param('phrase')) { + cgi_hyperestraier(); + } + my $do=$q->param('do'); if (! defined $do || ! length $do) { error("\"do\" parameter missing"); @@ -491,6 +501,9 @@ sub cgi () { #{{{ cgi_recentchanges($q); return; } + elsif ($do eq 'hyperestraier') { + cgi_hyperestraier(); + } CGI::Session->name("ikiwiki_session_$config{wikiname}"); |