diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-04-23 14:56:10 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-04-23 14:56:10 -0400 |
commit | 527d178c12141d2467dfa86492e249d021b88997 (patch) | |
tree | 1be3a5172a304ec64928638f74ae21e26db7f3ae /IkiWiki | |
parent | 748aa7af777caaa32ac5ab56e707509b3739b49e (diff) |
comments: Add link to comment post form to allow user to sign in if they wish to, if the configuration makes signin optional for commenting.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 98f9f8b3d..e618d1a90 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -317,6 +317,13 @@ sub editcomment ($$) { force => 1); } + if (! defined $session->param('name')) { + # Make signinurl work and return here. + $form->tmpl_param(signinurl => IkiWiki::cgiurl(do => 'signin')); + $session->param(postsignin => $ENV{QUERY_STRING}); + IkiWiki::cgi_savesession($session); + } + # The untaint is OK (as in editpage) because we're about to pass # it to file_pruned anyway my $page = $form->field('page'); |