Fix handling of discussion page creation links to make discussion pages in the right...
authorJoey Hess <joey@kitenet.net>
Sun, 6 Nov 2011 20:14:04 +0000 (16:14 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 6 Nov 2011 20:14:04 +0000 (16:14 -0400)
Broken by page case preservation feature added in 3.20110707.

IkiWiki/Plugin/editpage.pm
debian/changelog

index a385ed8395272446f62bbba41c5fb5876c0dbca0..a5c29a352788b37c70a6a56614e95152d36f069d 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=$page="$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 {
index 647a03f9a918dccffb94e1c3425f622b93d98fba..20ff8536b12a0b58ce4e575b027cd95c3b9c0163 100644 (file)
@@ -7,6 +7,9 @@ ikiwiki (3.20110906) UNRELEASED; urgency=low
   * rst: import docutils lazily, to avoid errors during ikiwiki --setup.
     Closes: #637604 (Thanks, smcv)
   * Make the setup automator create YAML formatted files.
+  * Fix handling of discussion page creation links to make discussion pages
+    in the right place and with the right case. Broken by page case
+    preservation feature added in 3.20110707.
 
  -- Joey Hess <joeyh@debian.org>  Tue, 27 Sep 2011 10:47:13 -0400