aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/comments.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-05-21 15:50:25 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-05-21 15:50:25 -0400
commit27193a2eeba3aa2f5ed8c0168f828149696b2b7f (patch)
treef8a1b89a9aab45e28e34c44bd226e08d7c733b73 /IkiWiki/Plugin/comments.pm
parent36dbd21be6384d187c40e6ae97ff7384461e3c7a (diff)
downloadikiwiki-27193a2eeba3aa2f5ed8c0168f828149696b2b7f.tar
ikiwiki-27193a2eeba3aa2f5ed8c0168f828149696b2b7f.tar.gz
support longname for page types in commands and rename
Also, sort the list of page types.
Diffstat (limited to 'IkiWiki/Plugin/comments.pm')
-rw-r--r--IkiWiki/Plugin/comments.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index e618d1a90..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,