X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f84b47d080f4d1ac47d12bd45a7004a6aba5875f..694eb98d3e186ff2db26415e80e71651a7cb571e:/IkiWiki/CGI.pm diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 74ed2f217..15e86651d 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -2,6 +2,7 @@ use warnings; use strict; +use IkiWiki; use IkiWiki::UserInfo; package IkiWiki; @@ -483,26 +484,21 @@ 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 (exists $hooks{cgi}) { + foreach my $id (keys %{$hooks{cgi}}) { + $hooks{cgi}{$id}{call}->($q); + } + } + my $do=$q->param('do'); if (! defined $do || ! length $do) { - if (defined $q->param('phrase')) { - cgi_hyperestraier(); - } - else { - error("\"do\" parameter missing"); - } + error("\"do\" parameter missing"); } # Things that do not need a session.