From 037942d0b264bc6b11a67e1e3c84d6a215748558 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 25 Jul 2011 22:16:26 +0800 Subject: Bug 589128: Adds a preference allowing users to choose between text or html for bugmail. r=LpSolit, a=LpSolit --- Bugzilla/User.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Bugzilla/User.pm') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index d21314604..188432241 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -593,11 +593,16 @@ sub settings { return $self->{'settings'}; } +sub setting { + my ($self, $name) = @_; + return $self->settings->{$name}->{'value'}; +} + sub timezone { my $self = shift; if (!defined $self->{timezone}) { - my $tz = $self->settings->{timezone}->{value}; + my $tz = $self->setting('timezone'); if ($tz eq 'local') { # The user wants the local timezone of the server. $self->{timezone} = Bugzilla->local_timezone; @@ -2241,6 +2246,10 @@ value - the value of this setting for this user. Will be the same is_default - a boolean to indicate whether the user has chosen to make a preference for themself or use the site default. +=item C + +Returns the value for the specified setting. + =item C Returns the timezone used to display dates and times to the user, -- cgit v1.2.3-24-g4f1b