jenkins-bot has submitted this change and it was merged.

Change subject: Fix contributions query for anons
......................................................................


Fix contributions query for anons

Bug: 70757
Change-Id: I5095fa9ac3f0ecb1cd3fd514754f183093eac015
---
M includes/specials/SpecialMobileContributions.php
1 file changed, 6 insertions(+), 5 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialMobileContributions.php 
b/includes/specials/SpecialMobileContributions.php
index 73ff6da..ae0cdbb 100644
--- a/includes/specials/SpecialMobileContributions.php
+++ b/includes/specials/SpecialMobileContributions.php
@@ -166,12 +166,13 @@
         * Returns a list of query conditions that should be run against the 
revision table
         */
        protected function getQueryConditions() {
+               $conds = array();
                if ( $this->user ) {
-                       $conds = array(
-                               'rev_user' => $this->user->getID(),
-                       );
-               } else {
-                       $conds = array();
+                       if ( $this->user->getId() ) {
+                               $conds['rev_user'] = $this->user->getId();
+                       } else {
+                               $conds['rev_user_text'] = 
$this->user->getName();
+                       }
                }
                if ( $this->offset ) {
                        $dbr = wfGetDB( DB_SLAVE, self::DB_REVISIONS_TABLE );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5095fa9ac3f0ecb1cd3fd514754f183093eac015
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to