diff options
author | Joey Hess <joey@kitenet.net> | 2010-05-07 17:11:23 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-05-07 17:11:23 -0400 |
commit | 2ee820dedd9ab80dd0f37c4169970485cb529c3b (patch) | |
tree | 475273a537eee92c3e72c8d193fdd04af81b18d3 | |
parent | 6a83be26471ac6615bad48a1a365a7e62e972a7b (diff) |
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.)
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |