fix --anonok
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 14 Apr 2006 18:10:18 +0000 (18:10 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 14 Apr 2006 18:10:18 +0000 (18:10 +0000)
IkiWiki/CGI.pm

index ac5365b2f0ce8056d704ddfd1bbf8425217c3cb0..8201351ca0e54608d983dbd5030e989e37f3d0e8 100644 (file)
@@ -516,9 +516,9 @@ sub cgi () { #{{{
        umask($oldmask);
        
        # Everything below this point needs the user to be signed in.
        umask($oldmask);
        
        # Everything below this point needs the user to be signed in.
-       if ((! $config{anonok} && ! defined $session->param("name") ||
-            ! defined $session->param("name") ||
-            ! userinfo_get($session->param("name"), "regdate")) || $do eq 'signin') {
+       if ((! $config{anonok} &&
+            (! defined $session->param("name") ||
+            ! userinfo_get($session->param("name"), "regdate"))) || $do eq 'signin') {
                cgi_signin($q, $session);
        
                # Force session flush with safe umask.
                cgi_signin($q, $session);
        
                # Force session flush with safe umask.