]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/editpage.pm
Remember to run all the tests before committing!
[git.ikiwiki.info.git] / IkiWiki / Plugin / editpage.pm
index a385ed8395272446f62bbba41c5fb5876c0dbca0..54051c58c2cf836e258c110d0ec4a47d6ff1e0a2 100644 (file)
@@ -230,13 +230,15 @@ sub cgi_editpage ($$) {
                                unshift @page_locs, lc($page)
                                        if ! $form->submitted && lc($page) ne $page;
                        }
+                       elsif (lc $page eq lc $config{discussionpage}) {
+                               @page_locs=$best_loc="$from/".lc($page);
+                       }
                        else {
                                my $dir=$from."/";
                                $dir=~s![^/]+/+$!!;
                                
                                if ((defined $form->field('subpage') &&
-                                    length $form->field('subpage')) ||
-                                   $page eq lc($config{discussionpage})) {
+                                    length $form->field('subpage'))) {
                                        $best_loc="$from/$page";
                                }
                                else {