foo
[ikiwiki.git] / ikiwiki
diff --git a/ikiwiki b/ikiwiki
index b57611b668c0d939ba4c7d8f64d5d7844677ff77..a9f76d3fe6e7e7b64124064399cd41ce8d177707 100755 (executable)
--- a/ikiwiki
+++ b/ikiwiki
@@ -610,6 +610,7 @@ sub cgi () {
                        $default_loc="$from/$page";
                        while (length $from) {
                                push @page_locs, "$from/$page";
+                               $from=dirname($from);
                        }
                        push @page_locs, $page;
                }
@@ -620,7 +621,7 @@ sub cgi () {
                      $q->h1("$wikiname: Creating $page"),
                      $q->start_form(-action => $action),
                      $q->hidden('do'),
-                     "Select page location:",
+                     "Select page location: ($default_loc)",
                      $q->popup_menu('page', \@page_locs, $default_loc),
                      $q->textarea(-name => 'content',
                               -default => "",