r87564 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87563‎ | r87564 | r87565 >
Date:19:17, 6 May 2011
Author:ialex
Status:deferred
Tags:
Comment:
Renamed SpecialOpenID::getUser() to getUserFromUrl() to not conflict with SpecialPage::getUser()
Modified paths:
  • /trunk/extensions/OpenID/SpecialOpenID.body.php (modified) (history)
  • /trunk/extensions/OpenID/SpecialOpenIDConvert.body.php (modified) (history)
  • /trunk/extensions/OpenID/SpecialOpenIDLogin.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenID/SpecialOpenIDLogin.body.php
@@ -451,7 +451,7 @@
452452 return;
453453 }
454454
455 - $user = self::getUser( $openid );
 455+ $user = self::getUserFromUrl( $openid );
456456
457457 if ( $user instanceof User ) {
458458 $this->updateUser( $user, $sreg, $ax ); # update from server
Index: trunk/extensions/OpenID/SpecialOpenID.body.php
@@ -347,7 +347,7 @@
348348 return $openid_urls;
349349 }
350350
351 - public function getUser( $openid ) {
 351+ public static function getUserFromUrl( $openid ) {
352352 $dbr = wfGetDB( DB_SLAVE );
353353
354354 $id = $dbr->selectField(
Index: trunk/extensions/OpenID/SpecialOpenIDConvert.body.php
@@ -75,7 +75,7 @@
7676 }
7777
7878 # Is this ID already taken?
79 - $other = $this->getUser( $openid_url );
 79+ $other = self::getUserFromUrl( $openid_url );
8080
8181 if ( isset( $other ) ) {
8282 if ( $other->getId() == $wgUser->getID() ) {
@@ -160,7 +160,7 @@
161161 global $wgUser, $wgOut, $wgRequest, $wgOpenIDOnly;
162162
163163 $openid = $wgRequest->getVal( 'url' );
164 - $user = self::getUser( $openid );
 164+ $user = self::getUserFromUrl( $openid );
165165
166166 if ( $user->getId() == 0 || $user->getId() != $wgUser->getId() ) {
167167 $wgOut->showErrorPage( 'openiderror', 'openidconvertothertext' );
@@ -239,7 +239,7 @@
240240 # We check again for dupes; this may be normalized or
241241 # reformatted by the server.
242242
243 - $other = $this->getUser( $openid_url );
 243+ $other = self::getUserFromUrl( $openid_url );
244244
245245 if ( isset( $other ) ) {
246246 if ( $other->getId() == $wgUser->getID() ) {

Status & tagging log