summaryrefslogtreecommitdiff
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
parentdc23d4989caeb43229f6f026f110334a59b24129 (diff)
* Allow editing a page and deleting all content, while still disallowing
creating a new page that's entirely empty.
-rw-r--r--IkiWiki/CGI.pm5
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/Can__39__t_deplete_page__63__.mdwn2
3 files changed, 6 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');
diff --git a/debian/changelog b/debian/changelog
index 091c3622f..7533ae99c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,8 @@ ikiwiki (2.16) UNRELEASED; urgency=low
* Use a div in the note template rather than a span.
* shortcut: Expand %S to the raw input text, not url-encoded.
* Don't increment feed numbers when an inline has no feeds. (Nis Martensen)
+ * Allow editing a page and deleting all content, while still disallowing
+ creating a new page that's entirely empty.
-- Joey Hess <joeyh@debian.org> Mon, 03 Dec 2007 14:47:36 -0500
diff --git a/doc/bugs/Can__39__t_deplete_page__63__.mdwn b/doc/bugs/Can__39__t_deplete_page__63__.mdwn
index cfa51cf48..5ae034e99 100644
--- a/doc/bugs/Can__39__t_deplete_page__63__.mdwn
+++ b/doc/bugs/Can__39__t_deplete_page__63__.mdwn
@@ -4,3 +4,5 @@ On web-editing I erased all the text, entered a change notice and selected
*Save Page*.
I was, however, thrown back to the web-editing frame, with the old text in it
restored, instead of the page being cleared.
+
+>> [[done]] --[[Joey]]