]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
web commit by ThomasSchwinge: I like it.
[ikiwiki.git] / IkiWiki / CGI.pm
index fa2287e82d4e20033076d259996f6097ae96575c..8201351ca0e54608d983dbd5030e989e37f3d0e8 100644 (file)
@@ -63,8 +63,7 @@ sub cgi_signin ($$) { #{{{
                required => 'NONE',
                javascript => 0,
                params => $q,
-               # Why was this added?
-               #action => $q->request_uri,
+               action => $config{cgiurl},
                header => 0,
                template => (-e "$config{templatedir}/signin.tmpl" ?
                              "$config{templatedir}/signin.tmpl" : ""),
@@ -230,7 +229,7 @@ sub cgi_prefs ($$) { #{{{
                required => 'NONE',
                javascript => 0,
                params => $q,
-               action => $q->request_uri,
+               action => $config{cgiurl},
                template => (-e "$config{templatedir}/prefs.tmpl" ?
                              "$config{templatedir}/prefs.tmpl" : ""),
                stylesheet => styleurl(),
@@ -294,7 +293,7 @@ sub cgi_editpage ($$) { #{{{
                required => [qw{content}],
                javascript => 0,
                params => $q,
-               action => $q->request_uri,
+               action => $config{cgiurl},
                table => 0,
                template => "$config{templatedir}/editpage.tmpl"
        );
@@ -517,9 +516,9 @@ sub cgi () { #{{{
        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.