diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-08-25 20:51:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-08-25 20:51:10 -0400 |
commit | d06096ad0d15dc7fb5e3187209a2908b3613b30b (patch) | |
tree | 4307a04bbf252352f35ec59f19ac2a4abd227551 /IkiWiki/Plugin | |
parent | 3c542cc27948542026729f7a8c0e03731236c1e0 (diff) |
edittemplate: Don't wipe out edits on preview.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/edittemplate.pm | 4 |
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 |