X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/260ee2a28368691a5f1a7dee918717a28d28ed2e..d1553bd361dd6c87470618a82cce27dea670496b:/IkiWiki/Plugin/comments.pm diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 98f9f8b3d..0aa4759d8 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -287,10 +287,15 @@ sub editcomment ($$) { else { $type = $config{default_pageext}; } + + my @page_types; if (exists $IkiWiki::hooks{htmlize}) { - @page_types = grep { ! /^_/ } keys %{$IkiWiki::hooks{htmlize}}; + foreach my $key (grep { !/^_/ } keys %{$IkiWiki::hooks{htmlize}}) { + push @page_types, [$key, $IkiWiki::hooks{htmlize}{$key}{longname} || $key]; + } } + @page_types=sort @page_types; $form->field(name => 'do', type => 'hidden'); $form->field(name => 'sid', type => 'hidden', value => $session->id, @@ -317,6 +322,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');