summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2011-07-25 16:16:26 +0200
committerByron Jones <bjones@mozilla.com>2011-07-25 16:16:26 +0200
commit037942d0b264bc6b11a67e1e3c84d6a215748558 (patch)
tree5dbb28c535e42453304e09db543b9675cb2143fb /Bugzilla/User.pm
parent7ddff2f30647abe482a19a9fd38a44383c5b0242 (diff)
downloadbugzilla-037942d0b264bc6b11a67e1e3c84d6a215748558.tar.gz
bugzilla-037942d0b264bc6b11a67e1e3c84d6a215748558.tar.xz
Bug 589128: Adds a preference allowing users to choose between text or html
for bugmail. r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm11
1 files changed, 10 insertions, 1 deletions
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<setting(name)>
+
+Returns the value for the specified setting.
+
=item C<timezone>
Returns the timezone used to display dates and times to the user,