]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
* Fix issue with unicode filenames and updating the hyper estradier search
[ikiwiki.git] / IkiWiki / CGI.pm
index 759a49b7da6697df3b305930836acbf74914dd89..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.");
        }
        
@@ -417,7 +417,7 @@ sub cgi_editpage ($$) { #{{{
                $form->field(name => "comments",
                                value => $comments, force => 1);
                $form->tmpl_param("page_preview",
-                       htmlize($type, linkify($page, $page, $content)));
+                       htmlize($type, linkify($page, $page, filter($page, $content))));
        }
        else {
                $form->tmpl_param("page_preview", "");
@@ -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) {