aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Fearn <Jeff.Fearn@gmail.com>2015-05-18 12:39:04 +0800
committerByron Jones <glob@mozilla.com>2015-05-18 12:39:04 +0800
commit3d2b724886e632659d94b53b64a1c14aeb4861ec (patch)
tree5620221e723524f15b7be4bae8fc23726511cd80
parente191f86ade269c2248a42744ddd6de03ec93e4fd (diff)
downloadbugs-3d2b724886e632659d94b53b64a1c14aeb4861ec.tar
bugs-3d2b724886e632659d94b53b64a1c14aeb4861ec.tar.gz
bugs-3d2b724886e632659d94b53b64a1c14aeb4861ec.tar.bz2
bugs-3d2b724886e632659d94b53b64a1c14aeb4861ec.tar.xz
bugs-3d2b724886e632659d94b53b64a1c14aeb4861ec.zip
Bug 1162334: email_enabled value inverted in User.update RPC call
r=glob,a=glob
-rw-r--r--Bugzilla/Constants.pm2
-rw-r--r--Bugzilla/User.pm9
-rw-r--r--Bugzilla/WebService/User.pm2
3 files changed, 8 insertions, 5 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index 5604794c7..c0aadd298 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -213,7 +213,7 @@ use constant LOCAL_FILE => 'bugzilla-update.xml'; # Relative to datadir.
# When true CSS and JavaScript assets will be concatanted and minified at
# run-time, to reduce the number of requests required to render a page.
# Setting this to a false value can help debugging.
-use constant CONCATENATE_ASSETS => 0;
+use constant CONCATENATE_ASSETS => 1;
# These are unique values that are unlikely to match a string or a number,
# to be used in criteria for match() functions and other things. They start
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index e7d2fbafe..e63be93dd 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -314,8 +314,9 @@ sub _check_is_enabled {
# Mutators
################################################################################
-sub set_disable_mail { $_[0]->set('disable_mail', $_[1]); }
-sub set_extern_id { $_[0]->set('extern_id', $_[1]); }
+sub set_disable_mail { $_[0]->set('disable_mail', $_[1]); }
+sub set_email_enabled { $_[0]->set('disable_mail', !$_[1]); }
+sub set_extern_id { $_[0]->set('extern_id', $_[1]); }
sub set_login {
my ($self, $login) = @_;
@@ -2679,6 +2680,10 @@ This notes that this account has failed to log in, and stores the fact
in the database. The storing happens immediately, it does not wait for
you to call C<update>.
+=item C<set_email_enabled>
+
+C<bool> - Sets C<disable_mail> to the inverse of the boolean provided.
+
=back
=head2 Other Methods
diff --git a/Bugzilla/WebService/User.pm b/Bugzilla/WebService/User.pm
index 06698668c..0ae76d70f 100644
--- a/Bugzilla/WebService/User.pm
+++ b/Bugzilla/WebService/User.pm
@@ -46,14 +46,12 @@ use constant MAPPED_FIELDS => {
email => 'login',
full_name => 'name',
login_denied_text => 'disabledtext',
- email_enabled => 'disable_mail'
};
use constant MAPPED_RETURNS => {
login_name => 'email',
realname => 'full_name',
disabledtext => 'login_denied_text',
- disable_mail => 'email_enabled'
};
##############