r84893 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84892‎ | r84893 | r84894 >
Date:03:25, 28 March 2011
Author:dantman
Status:ok (Comments)
Tags:
Comment:
Followup r79433, hide realname from output when realnames are a hidden pref.
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryUserInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryUserInfo.php
@@ -55,7 +55,7 @@
5656 }
5757
5858 protected function getCurrentUserInfo() {
59 - global $wgUser, $wgRequest;
 59+ global $wgUser, $wgRequest, $wgHiddenPrefs;
6060 $result = $this->getResult();
6161 $vals = array();
6262 $vals['id'] = intval( $wgUser->getId() );
@@ -115,7 +115,7 @@
116116 $vals['ratelimits'] = $this->getRateLimits();
117117 }
118118
119 - if ( isset( $this->prop['realname'] ) ) {
 119+ if ( isset( $this->prop['realname'] ) && !in_array( 'realname', $wgHiddenPrefs ) ) {
120120 $vals['realname'] = $wgUser->getRealName();
121121 }
122122

Sign-offs

UserFlagDate
Nikerabbitinspected11:02, 28 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79433Add a realname option to query=userinfo in the api.dantman17:38, 1 January 2011

Comments

#Comment by Bryan (talk | contribs)   21:50, 14 April 2011

Don't like it, but ok.

Status & tagging log