]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
testing
[ikiwiki.git] / IkiWiki / CGI.pm
index 65e6a2ae9975dd74cbbf16b7b6d373f31ac3c0c9..14861e398d5e04fa5f050fe3e7626df8f3c3a44d 100644 (file)
@@ -67,8 +67,6 @@ sub decode_form_utf8 ($) { #{{{
 sub cgi_recentchanges ($) { #{{{
        my $q=shift;
        
-       unlockwiki();
-
        # Optimisation: building recentchanges means calculating lots of
        # links. Memoizing htmllink speeds it up a lot (can't be memoized
        # during page builds as the return values may change, but they
@@ -151,11 +149,11 @@ sub cgi_signin ($$) { #{{{
                
        decode_form_utf8($form);
        
-       $form->field(name => "name", required => 0);
+       $form->field(name => "name", required => 0, size => 30);
        $form->field(name => "do", type => "hidden");
        $form->field(name => "password", type => "password", required => 0);
        if ($config{openid}) {
-               $form->field(name => "openid_url", label => "OpenID",
+               $form->field(name => "openid_url", label => "OpenID", size => 30,
                        comment => '('.
                                htmllink("", "", "OpenID", 1, 0, "What's this?")
                                .($config{openidsignup} ? " | <a href=\"$config{openidsignup}\">Get an OpenID</a>" : "")
@@ -364,7 +362,7 @@ sub cgi_prefs ($$) { #{{{
        my $user_name=$session->param("name");
        $form->field(name => "do", type => "hidden");
        $form->field(name => "name", disabled => 1,
-               value => $user_name, force => 1);
+               value => $user_name, force => 1, size => 30);
        $form->field(name => "password", type => "password");
        $form->field(name => "confirm_password", type => "password");
        $form->field(name => "subscriptions", size => 50,
@@ -715,6 +713,9 @@ sub cgi (;$$) { #{{{
        elsif ($do eq 'hyperestraier') {
                cgi_hyperestraier();
        }
+
+       # Need to lock the wiki before getting a session.
+       lockwiki();
        
        if (! $session) {
                CGI::Session->name("ikiwiki_session_".encode_utf8($config{wikiname}));