summaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-12 20:31:02 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-12 20:31:02 +0000
commit6e0098211da9c1270a019a123b4af5dcb65faac6 (patch)
tree8b92997760c2e1760f5c55689801ea6b71d91bda /ikiwiki
parent28d634aa88b9bf54962d345b39d7c6c09e2bd38d (diff)
don't allow saving empty page
Diffstat (limited to 'ikiwiki')
-rwxr-xr-xikiwiki14
1 files changed, 8 insertions, 6 deletions
diff --git a/ikiwiki b/ikiwiki
index 0f6f250a0..06627fc29 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -720,7 +720,7 @@ sub cgi_recentchanges ($) { #{{{
print $q->header, $template->output;
} #}}}
-sub userinfo_get ($$) { #{{
+sub userinfo_get ($$) { #{{{
my $user=shift;
my $field=shift;
@@ -731,9 +731,9 @@ sub userinfo_get ($$) { #{{
return "";
}
return $userdata->{$user}->{$field};
-} #}}
+} #}}}
-sub userinfo_set ($$) { #{{
+sub userinfo_set ($$) { #{{{
my $user=shift;
my $info=shift;
@@ -747,7 +747,7 @@ sub userinfo_set ($$) { #{{
my $ret=Storable::lock_store($userdata, "$srcdir/.ikiwiki/userdb");
umask($oldmask);
return $ret;
-} #}}
+} #}}}
sub cgi_signin ($$) { #{{{
my $q=shift;
@@ -916,8 +916,10 @@ sub cgi_editpage ($$) { #{{{
fields => [qw(do from page content comments)],
header => 1,
method => 'POST',
- validate => {},
- required => [qw{}],
+ validate => {
+ content => '/.+/',
+ },
+ required => [qw{content}],
javascript => 0,
params => $q,
action => $q->request_uri,