From: lpsolit%gmail.com <> Date: Sun, 8 Jan 2006 00:01:35 +0000 (+0000) Subject: Bug 322212: DERIVE_GROUPS_TABLES_ALREADY_LOCKED is ignored on 2.20+ when creating... X-Git-Tag: bugzilla-2.20.1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc05f16850151b5e4d8444ab517c1106724533a7;p=thirdparty%2Fbugzilla.git Bug 322212: DERIVE_GROUPS_TABLES_ALREADY_LOCKED is ignored on 2.20+ when creating a new user object - Patch by Frédéric Buclin r=wicked a=justdave --- diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index df2eb14073..909511ca24 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -67,7 +67,7 @@ use constant MATCH_SKIP_CONFIRM => 1; sub new { my $invocant = shift; - my $user_id = shift; + my ($user_id, $tables_locked) = @_; if ($user_id) { my $uid = $user_id; @@ -76,7 +76,7 @@ sub new { {argument => 'userID', value => $uid, function => 'Bugzilla::User::new'}); - return $invocant->_create("userid=?", $user_id); + return $invocant->_create('userid = ?', $user_id, $tables_locked); } else { return $invocant->_create; @@ -93,10 +93,11 @@ sub new { # in the id its already had to validate (or the User.pm object, of course) sub new_from_login { my $invocant = shift; - my $login = shift; + my ($login, $tables_locked) = @_; my $dbh = Bugzilla->dbh; - return $invocant->_create($dbh->sql_istrcmp('login_name', '?'), $login); + return $invocant->_create($dbh->sql_istrcmp('login_name', '?'), + $login, $tables_locked); } # Internal helper for the above |new| methods