summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-23 14:25:37 +0100
committerYorhel <git@yorhel.nl>2010-12-23 14:25:37 +0100
commit3eb574e4e26162aa754372fff806e4c6de8f4754 (patch)
tree32b08348512dc2f16d932676bb9b1b61fab16f3a /lib/VNDB/Util
parent6ff1efe0d07e24e9fb2db199c308c6cbed51e578 (diff)
Converted the notify_announce and notify_dbedit preferences
And renamed notify_dbedit to notify_nodbedit, since the default is to provide a notify on a database edit. Also fixed a few bugs along the way.
Diffstat (limited to 'lib/VNDB/Util')
-rw-r--r--lib/VNDB/Util/Auth.pm9
-rw-r--r--lib/VNDB/Util/FormHTML.pm2
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm
index 50b81eb2..932a48ee 100644
--- a/lib/VNDB/Util/Auth.pm
+++ b/lib/VNDB/Util/Auth.pm
@@ -198,10 +198,11 @@ sub _incorrectcode {
sub authPref {
my($self, $key, $val) = @_;
- return '' if !$self->authInfo->{id};
- return $self->{_auth}{prefs}{$key}||'' if @_ == 2;
- $self->{_auth}{prefs}{$key} = $val;
- $self->dbUserPrefSet($key, $val);
+ my $nfo = $self->authInfo;
+ return '' if !$nfo->{id};
+ return $nfo->{prefs}{$key}||'' if @_ == 2;
+ $nfo->{prefs}{$key} = $val;
+ $self->dbUserPrefSet($nfo->{id}, $key, $val);
}
1;
diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm
index 7956a4c2..41ee0ccc 100644
--- a/lib/VNDB/Util/FormHTML.pm
+++ b/lib/VNDB/Util/FormHTML.pm
@@ -89,7 +89,7 @@ sub htmlFormPart {
end;
td class => 'field';
input type => 'checkbox', name => $o{short}, id => $o{short},
- value => $o{value}||1, $frm->{$o{short}} ? ( checked => 'checked' ) : ();
+ value => $o{value}||1, ($frm->{$o{short}}||0) eq ($o{value}||1) ? ( checked => 'checked' ) : ();
label for => $o{short};
lit $o{name};
end;