summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-03-10 15:23:15 +0100
committerByron Jones <glob@mozilla.com>2015-03-10 15:23:15 +0100
commite3194040ce6433ee38775e9a0e2cd1af37b41886 (patch)
tree6730837d4845a356555896284e1e97b436cd00e7 /extensions
parent63bada08f443c42f225f3d06d8423dcea45d6947 (diff)
downloadbugzilla-e3194040ce6433ee38775e9a0e2cd1af37b41886.tar.gz
bugzilla-e3194040ce6433ee38775e9a0e2cd1af37b41886.tar.xz
Bug 1141518: error when setting "block needinfo" or "block review requests"
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Needinfo/Extension.pm9
-rw-r--r--extensions/Review/Extension.pm9
2 files changed, 6 insertions, 12 deletions
diff --git a/extensions/Needinfo/Extension.pm b/extensions/Needinfo/Extension.pm
index c03c251b4..f988defd6 100644
--- a/extensions/Needinfo/Extension.pm
+++ b/extensions/Needinfo/Extension.pm
@@ -233,15 +233,12 @@ sub user_preferences {
&& $args->{save_changes};
my $input = Bugzilla->input_params;
- my $dbh = Bugzilla->dbh;
my $settings = Bugzilla->user->settings;
- $dbh->bz_start_transaction();
my $value = $input->{block_needinfo} ? 'on' : 'off';
- my $setting = Bugzilla::User::Setting->new('block_needinfo');
- $setting->validate_value($value);
- $settings->{'block_needinfo'}->set($value);
- $dbh->bz_commit_transaction();
+ $settings->{block_needinfo}->validate_value($value);
+ $settings->{block_needinfo}->set($value);
+ clear_settings_cache(Bugzilla->user->id);
}
__PACKAGE__->NAME;
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm
index ab15e8a7b..07f1f66c0 100644
--- a/extensions/Review/Extension.pm
+++ b/extensions/Review/Extension.pm
@@ -639,15 +639,12 @@ sub user_preferences {
&& $args->{save_changes};
my $input = Bugzilla->input_params;
- my $dbh = Bugzilla->dbh;
my $settings = Bugzilla->user->settings;
- $dbh->bz_start_transaction();
my $value = $input->{block_reviews} ? 'on' : 'off';
- my $setting = Bugzilla::User::Setting->new('block_reviews');
- $setting->validate_value($value);
- $settings->{'block_reviews'}->set($value);
- $dbh->bz_commit_transaction();
+ $settings->{block_reviews}->validate_value($value);
+ $settings->{block_reviews}->set($value);
+ clear_settings_cache(Bugzilla->user->id);
}
sub page_before_template {