avid unnecessary cookies

master
joey 2006-03-12 04:10:52 +00:00
parent cae5e22a8d
commit 63451844f6
1 changed files with 13 additions and 10 deletions

23
ikiwiki
View File

@ -777,6 +777,18 @@ sub cgi () { #{{{
eval q{use CGI::Session};
my $q=CGI->new;
my $do=$q->param('do');
if (! defined $do || ! length $do) {
error("\"do\" parameter missing");
}
# This does not need a session.
if ($do eq 'recentchanges') {
cgi_recentchanges($q);
return;
}
# session id has to be _sessionid for CGI::FormBuilder to work.
# TODO: stop having the formbuilder emit cookies and change session
# id to something else.
@ -784,16 +796,7 @@ sub cgi () { #{{{
my $session = CGI::Session->new(undef, $q,
{ Directory=> "$srcdir/.ikiwiki/sessions" });
my $do=$q->param('do');
if (! defined $do || ! length $do) {
error("\"do\" parameter missing");
}
if ($do eq 'recentchanges') {
cgi_recentchanges($q);
return;
}
# Everything below this point needs the user to be signed in.
if ((! $anonok && ! defined $session->param("name")) || $do eq 'signin') {
cgi_signin($q, $session);
return;