aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/CGI.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2007-12-12 19:11:29 -0500
committerJoey Hess <joey@kitenet.net>2007-12-12 19:11:29 -0500
commit5b2ab63f7873b27229a5617d0c208a526b25cd2c (patch)
tree1ebf3e2f555ab8499389c3849e394ec580b2ee94 /IkiWiki/CGI.pm
parentdc23d4989caeb43229f6f026f110334a59b24129 (diff)
downloadikiwiki-5b2ab63f7873b27229a5617d0c208a526b25cd2c.tar
ikiwiki-5b2ab63f7873b27229a5617d0c208a526b25cd2c.tar.gz
* Allow editing a page and deleting all content, while still disallowing
creating a new page that's entirely empty.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r--IkiWiki/CGI.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 33e670eac..c2dacf78d 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -310,9 +310,6 @@ sub cgi_editpage ($$) { #{{{
fields => \@fields,
charset => "utf-8",
method => 'POST',
- validate => {
- editcontent => '/.+/',
- },
required => [qw{editcontent}],
javascript => 0,
params => $q,
@@ -356,6 +353,7 @@ sub cgi_editpage ($$) { #{{{
$form->field(name => "rcsinfo",
value => rcs_prepedit($file), force => 1);
}
+ $form->field(name => "editcontent", validate => '/.*/');
}
else {
$type=$form->param('type');
@@ -371,6 +369,7 @@ sub cgi_editpage ($$) { #{{{
if (! $form->submitted) {
$form->field(name => "rcsinfo", value => "", force => 1);
}
+ $form->field(name => "editcontent", validate => '/.+/');
}
$form->field(name => "do", type => 'hidden');