$dir=~s![^/]+/+$!!;
if ((defined $form->field('subpage') && length $form->field('subpage')) ||
- $page eq gettext('discussion')) {
+ $page eq lc(gettext('Discussion'))) {
$best_loc="$from/$page";
}
else {
my @page_types;
if (exists $hooks{htmlize}) {
foreach my $key (grep { !/^_/ } keys %{$hooks{htmlize}}) {
- my $pluginref = ${$hooks{htmlize}}{$key};
- if(${$pluginref}{'longname'}) {
- push @page_types, [$key, ${$pluginref}{'longname'}];
- } else {
- push @page_types, [$key, $key];
- }
+ 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',