r24529 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24528‎ | r24529 | r24530 >
Date:20:11, 1 August 2007
Author:yurik
Status:old
Tags:
Comment:
Per Brion's suggestion, fixed blocker user detection: User::whoIs($wgUser->blockedBy());
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUserInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -743,16 +743,11 @@
744744 $this->setRobotpolicy( 'noindex,nofollow' );
745745 $this->setArticleRelated( false );
746746
747 - $id = $wgUser->blockedBy();
 747+ $name = User::whoIs( $wgUser->blockedBy() );
748748 $reason = $wgUser->blockedFor();
749749 $blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $wgUser->mBlock->mTimestamp ), true );
750750 $ip = wfGetIP();
751751
752 - if ( is_numeric( $id ) ) {
753 - $name = User::whoIs( $id );
754 - } else {
755 - $name = $id;
756 - }
757752 $link = '[[' . $wgContLang->getNsText( NS_USER ) . ":{$name}|{$name}]]";
758753
759754 $blockid = $wgUser->mBlock->mId;
Index: trunk/phase3/includes/api/ApiQueryUserInfo.php
@@ -55,8 +55,7 @@
5656 $prop = array_flip($params['prop']);
5757 if (isset($prop['blockinfo'])) {
5858 if ($wgUser->isBlocked()) {
59 - $id = $wgUser->blockedBy();
60 - $vals['blockedby'] = is_numeric($id) ? User::whoIs($id) : $id;
 59+ $vals['blockedby'] = User::whoIs($wgUser->blockedBy());
6160 $vals['blockreason'] = $wgUser->blockedFor();
6261 }
6362 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r24631Merged revisions 24480-24600 via svnmerge from...david18:39, 6 August 2007

Status & tagging log