From: Joey Hess Date: Fri, 7 May 2010 21:11:23 +0000 (-0400) Subject: avoid linking directly to ikiwiki.cgi?do=signin X-Git-Tag: 3.20100515~63^2~22 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2ee820dedd9ab80dd0f37c4169970485cb529c3b;p=ikiwiki.git avoid linking directly to ikiwiki.cgi?do=signin Instead, add a custom do=commentsignin, that calls cgi_signin. This allows a plugin to inject a custom cgi_signin, that uses a different do= parameter, and have it be used consitently. (This was the only place to hardcode a link to do=signin.) --- diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 89560c88b..6d513cd2a 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -251,6 +251,10 @@ sub sessioncgi ($$) { elsif ($do eq 'commentmoderation') { commentmoderation($cgi, $session); } + elsif ($do eq 'commentsignin') { + IkiWiki::cgi_signin($cgi, $session); + exit; + } } # Mostly cargo-culted from IkiWiki::plugin::editpage @@ -328,7 +332,7 @@ sub editcomment ($$) { if (! defined $session->param('name')) { # Make signinurl work and return here. - $form->tmpl_param(signinurl => IkiWiki::cgiurl(do => 'signin')); + $form->tmpl_param(signinurl => IkiWiki::cgiurl(do => 'commentsignin')); $session->param(postsignin => $ENV{QUERY_STRING}); IkiWiki::cgi_savesession($session); }