01tonythomas has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/175440

Change subject: Use the right DB in getOriginalEmail() instead of the sharedDb
......................................................................

Use the right DB in getOriginalEmail() instead of the sharedDb

Change-Id: I344cb6f115824d9c8f4da4b8ac9b6ae9e8aae5a4
(cherry picked from commit 35b13e88f4cd2bd4743103ae07a1a4fc51e5671a)
---
M includes/ProcessBounceEmails.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BounceHandler 
refs/changes/40/175440/1

diff --git a/includes/ProcessBounceEmails.php b/includes/ProcessBounceEmails.php
index d52ed91..16f7757 100644
--- a/includes/ProcessBounceEmails.php
+++ b/includes/ProcessBounceEmails.php
@@ -121,7 +121,8 @@
                // the required database.
                $wikiId = $failedUser['wikiId'];
                $rawUserId = $failedUser['rawUserId'];
-               $dbr = self::getBounceRecordDB( DB_SLAVE, $wikiId );
+               $lb = wfGetLB( $wikiId );
+               $dbr = $lb->getConnection( DB_SLAVE, array(), $wikiId );
 
                $res = $dbr->selectRow(
                        'user',
@@ -131,6 +132,7 @@
                        ),
                        __METHOD__
                );
+               wfGetLB( $wikiId )->reuseConnection( $dbr );
                if( $res !== false ) {
                        $rawEmail = $res->user_email;
                        return $rawEmail;

-- 
To view, visit https://gerrit.wikimedia.org/r/175440
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I344cb6f115824d9c8f4da4b8ac9b6ae9e8aae5a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BounceHandler
Gerrit-Branch: wmf/1.25wmf9
Gerrit-Owner: 01tonythomas <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to