summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-28 22:56:56 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-28 22:56:56 +0000
commitbce9a327c305455c4721d9f6b087a9298f7e460f (patch)
treeffc70ac764af5c218f5e69ad806d857126742735 /IkiWiki
parentc72af182d87353cc520d29fe89e2cc91538b35bb (diff)
Put in a quick fix for a bug involving page preview while creating a page
that caused the page location to be changed to a subdir. This is not a very good fix.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/CGI.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index f472413b8..89047a952 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -355,7 +355,9 @@ sub cgi_editpage ($$) { #{{{
my ($from)=$form->param('from')=~/$config{wiki_file_regexp}/;
if (! defined $from || ! length $from ||
$from ne $form->param('from') ||
- $from=~/$config{wiki_file_prune_regexp}/ || $from=~/^\//) {
+ $from=~/$config{wiki_file_prune_regexp}/ ||
+ $from=~/^\// ||
+ $form->submitted eq "Preview") {
@page_locs=$best_loc=$page;
}
else {