summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-08-25 20:51:10 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-08-25 20:51:10 -0400
commitd06096ad0d15dc7fb5e3187209a2908b3613b30b (patch)
tree4307a04bbf252352f35ec59f19ac2a4abd227551 /IkiWiki/Plugin
parent3c542cc27948542026729f7a8c0e03731236c1e0 (diff)
edittemplate: Don't wipe out edits on preview.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/edittemplate.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm
index cdcdd074f..98308de13 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
@@ -64,7 +64,9 @@ sub formbuilder (@) { #{{{
my %params=@_;
my $form=$params{form};
- return if $form->field("do") ne "create";
+ return if $form->field("do") ne "create" ||
+ length $form->field("editcontent");
+
my $page=$form->field("page");
# The tricky bit here is that $page is probably just the base