summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-10-02 12:42:46 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-10-02 12:42:46 -0400
commite0fd02acf1d40d8f049a7f470e07eebad28cab3d (patch)
tree9d9a7be8f14ea287f46301bb6726bb025211ebbc /IkiWiki
parent45a2074071882b3bcb13b8983a4e5b6be0eda750 (diff)
don't special case preview
Whenever the edit form is submitted, but not saved, the page location select should reduce to the currently selected value. This was only done when previewing before, but is also needed in order to support the case of adding an attachment to a page that is just being created. Before this change, the attachment plugin would get a weird value in $form->field("page"), that did not reflect the actual page location.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/editpage.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm
index 794548c6d..30c93df20 100644
--- a/IkiWiki/Plugin/editpage.pm
+++ b/IkiWiki/Plugin/editpage.pm
@@ -250,7 +250,7 @@ sub cgi_editpage ($$) { #{{{
file_pruned($from, $config{srcdir}) ||
$from=~/^\// ||
$absolute ||
- $form->submitted eq "Preview") {
+ $form->submitted) {
@page_locs=$best_loc=$page;
}
else {