summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/comments.pm7
-rw-r--r--IkiWiki/Plugin/editpage.pm1
-rw-r--r--IkiWiki/Plugin/rename.pm8
3 files changed, 12 insertions, 4 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,
diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm
index af42097ba..8effc02d0 100644
--- a/IkiWiki/Plugin/editpage.pm
+++ b/IkiWiki/Plugin/editpage.pm
@@ -280,6 +280,7 @@ sub cgi_editpage ($$) {
push @page_types, [$key, $hooks{htmlize}{$key}{longname} || $key];
}
}
+ @page_types=sort @page_types;
$form->tmpl_param("page_select", 1);
$form->field(name => "page", type => 'select',
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
index 41af3ca4d..0b6e74705 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
@@ -116,14 +116,16 @@ sub rename_form ($$$) {
# insert the standard extensions
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;
# make sure the current extension is in the list
my ($ext) = $pagesources{$page}=~/\.([^.]+)$/;
if (! $IkiWiki::hooks{htmlize}{$ext}) {
- unshift(@page_types, $ext);
+ unshift(@page_types, [$ext, $ext]);
}
$f->field(name => "type", type => 'select',