X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/c92ab9cdddddb5eab9579bcdb79e913ce942a135..98f08ddaabeaf7983993d91293cc2816ed2f921b:/IkiWiki/CGI.pm diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 9fc65e34a..d3f0203d8 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -655,9 +655,6 @@ sub cgi (;$$) { #{{{ cgi_recentchanges($q); return; } - elsif ($do eq 'hyperestraier') { - cgi_hyperestraier(); - } # Need to lock the wiki before getting a session. lockwiki(); @@ -691,7 +688,10 @@ sub cgi (;$$) { #{{{ print gettext("You are banned."); cgi_savesession($session); } - elsif ($do eq 'signin') { + + run_hooks(sessioncgi => sub { shift->($q, $session) }); + + if ($do eq 'signin') { cgi_signin($q, $session); cgi_savesession($session); } @@ -704,21 +704,6 @@ sub cgi (;$$) { #{{{ elsif ($do eq 'create' || $do eq 'edit') { cgi_editpage($q, $session); } - elsif ($do eq 'blog') { - my $page=decode_utf8($q->param('title')); - $page=~s/\///g; # no slashes in blog posts - # if the page already exists, munge it to be unique - my $from=$q->param('from'); - my $add=""; - while (exists $pagecase{lc($from."/".titlepage($page).$add)}) { - $add=1 unless length $add; - $add++; - } - $q->param('page', $page.$add); - # now run same as create - $q->param('do', 'create'); - cgi_editpage($q, $session); - } elsif ($do eq 'postsignin') { error(gettext("login failed, perhaps you need to turn on cookies?")); }