]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/CGI.pm
avoid message if mailing password or registering
[git.ikiwiki.info.git] / IkiWiki / CGI.pm
index 7360ca998f29757032955d343122ab2cf32002e8..fc5dfc2efde84d552940dda35efc511ce92e87dd 100644 (file)
@@ -114,7 +114,7 @@ sub cgi_signin ($$) { #{{{
        $form->field(name => "password", type => "password", required => 0);
        $form->field(name => "confirm_password", type => "password", required => 0);
        $form->field(name => "email", required => 0);
-       if ($q->param("do") ne "signin") {
+       if ($q->param("do") ne "signin" && !$form->submitted) {
                $form->text("You need to log in first.");
        }
        
@@ -567,11 +567,7 @@ sub cgi () { #{{{
        
        my $q=CGI->new;
        
-       if (exists $hooks{cgi}) {
-               foreach my $id (keys %{$hooks{cgi}}) {
-                       $hooks{cgi}{$id}{call}->($q);
-               }
-       }
+       run_hooks(cgi => sub { shift->($q) });
        
        my $do=$q->param('do');
        if (! defined $do || ! length $do) {