]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/editpage.pm
got rid of the postrefresh hook after all
[git.ikiwiki.info.git] / IkiWiki / Plugin / editpage.pm
index af42097baedc2acb46534e9c818e0124ec0dc82b..fca970c60be3a13199298ddf736c70d14dd2528d 100644 (file)
@@ -229,8 +229,9 @@ sub cgi_editpage ($$) {
                                my $dir=$from."/";
                                $dir=~s![^/]+/+$!!;
                                
-                               if ((defined $form->field('subpage') && length $form->field('subpage')) ||
-                                   $page eq gettext('discussion')) {
+                               if ((defined $form->field('subpage') &&
+                                    length $form->field('subpage')) ||
+                                   $page eq lc($config{discussionpage})) {
                                        $best_loc="$from/$page";
                                }
                                else {
@@ -280,6 +281,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',