aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/CGI.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-04-25 00:22:41 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-04-25 00:22:41 +0000
commitb7f64d884cd8bd8e1d9e8fb75735530d4c8a135d (patch)
treee224f6a9e74329e3d5b894a3e885c9a99c3bca5f /IkiWiki/CGI.pm
parenta804c92abd4b0c2955c7d397b7dddc1620249218 (diff)
downloadikiwiki-b7f64d884cd8bd8e1d9e8fb75735530d4c8a135d.tar
ikiwiki-b7f64d884cd8bd8e1d9e8fb75735530d4c8a135d.tar.gz
subscription nearly done
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r--IkiWiki/CGI.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 1d642687b..feed00487 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -217,7 +217,8 @@ sub cgi_prefs ($$) { #{{{
eval q{use CGI::FormBuilder};
my $form = CGI::FormBuilder->new(
title => "preferences",
- fields => [qw(do name password confirm_password email locked_pages)],
+ fields => [qw(do name password confirm_password email
+ subscriptions locked_pages)],
header => 0,
method => 'POST',
validate => {
@@ -242,6 +243,8 @@ sub cgi_prefs ($$) { #{{{
value => $user_name, force => 1);
$form->field(name => "password", type => "password");
$form->field(name => "confirm_password", type => "password");
+ $form->field(name => "subscriptions", size => 50,
+ comment => "(".htmllink("", "GlobList", 1).")");
$form->field(name => "locked_pages", size => 50,
comment => "(".htmllink("", "GlobList", 1).")");
@@ -252,6 +255,8 @@ sub cgi_prefs ($$) { #{{{
if (! $form->submitted) {
$form->field(name => "email", force => 1,
value => userinfo_get($user_name, "email"));
+ $form->field(name => "subscriptions", force => 1,
+ value => userinfo_get($user_name, "subscriptions"));
$form->field(name => "locked_pages", force => 1,
value => userinfo_get($user_name, "locked_pages"));
}
@@ -266,7 +271,7 @@ sub cgi_prefs ($$) { #{{{
return;
}
elsif ($form->submitted eq "Save Preferences" && $form->validate) {
- foreach my $field (qw(password email locked_pages)) {
+ foreach my $field (qw(password email subscriptions locked_pages)) {
if (length $form->field($field)) {
userinfo_set($user_name, $field, $form->field($field)) || error("failed to set $field");
}