summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-07 17:11:23 -0400
committerJoey Hess <joey@kitenet.net>2010-05-07 17:11:23 -0400
commit2ee820dedd9ab80dd0f37c4169970485cb529c3b (patch)
tree475273a537eee92c3e72c8d193fdd04af81b18d3
parent6a83be26471ac6615bad48a1a365a7e62e972a7b (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.pm6
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);
}