]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/CGI.pm
web commit by http://jeremie.koenig.myopenid.com/
[git.ikiwiki.info.git] / IkiWiki / CGI.pm
index 2150ea95bc8a24a1a0f4de8c247402b624f399aa..5aa744c9490eaae61c9549afcb0604c36f5e055b 100644 (file)
@@ -138,7 +138,6 @@ sub cgi_signin ($$) { #{{{
        my $form = CGI::FormBuilder->new(
                title => "signin",
                name => "signin",
-               header => 1,
                charset => "utf-8",
                method => 'POST',
                required => 'NONE',
@@ -306,7 +305,6 @@ sub cgi_editpage ($$) { #{{{
        error($@) if $@;
        my $form = CGI::FormBuilder->new(
                fields => \@fields,
-               header => 1,
                charset => "utf-8",
                method => 'POST',
                validate => {
@@ -688,7 +686,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);
        }
@@ -701,21 +702,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?"));
        }