From 6182886b3d60f344e418b92e6a01becaad9f65a0 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 5 Mar 2014 22:57:24 -0500 Subject: [PATCH] API: Fix logic for list=recentchanges prop=userid When prop=userid is requested, we need the rc_user field; when prop=user is requested, we need both rc_user and rc_user_text. But for some reason when only prop=userid is requested the code is requesting only rc_user_text and not rc_user. Fix that. Bug: 62301 Change-Id: I86f1f35ebd18e45335cdf43ab3ba0a3e9b0e06b4 --- includes/api/ApiQueryRecentChanges.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 6ccc2886c4..30dd741026 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -281,8 +281,8 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { /* Add fields to our query if they are specified as a needed parameter. */ $this->addFieldsIf( array( 'rc_this_oldid', 'rc_last_oldid' ), $this->fld_ids ); $this->addFieldsIf( 'rc_comment', $this->fld_comment || $this->fld_parsedcomment ); - $this->addFieldsIf( 'rc_user', $this->fld_user ); - $this->addFieldsIf( 'rc_user_text', $this->fld_user || $this->fld_userid ); + $this->addFieldsIf( 'rc_user', $this->fld_user || $this->fld_userid ); + $this->addFieldsIf( 'rc_user_text', $this->fld_user ); $this->addFieldsIf( array( 'rc_minor', 'rc_type', 'rc_bot' ), $this->fld_flags ); $this->addFieldsIf( array( 'rc_old_len', 'rc_new_len' ), $this->fld_sizes ); $this->addFieldsIf( 'rc_patrolled', $this->fld_patrolled ); -- 2.20.1