diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
commit | 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch) | |
tree | af68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /includes/UserRightsProxy.php | |
parent | af4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff) |
Update to MediaWiki 1.22.0
Diffstat (limited to 'includes/UserRightsProxy.php')
-rw-r--r-- | includes/UserRightsProxy.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/UserRightsProxy.php b/includes/UserRightsProxy.php index cd5dff84..a8a22be7 100644 --- a/includes/UserRightsProxy.php +++ b/includes/UserRightsProxy.php @@ -74,7 +74,7 @@ class UserRightsProxy { */ public static function whoIs( $database, $id, $ignoreInvalidDB = false ) { $user = self::newFromId( $database, $id, $ignoreInvalidDB ); - if( $user ) { + if ( $user ) { return $user->name; } else { return false; @@ -114,12 +114,12 @@ class UserRightsProxy { */ private static function newFromLookup( $database, $field, $value, $ignoreInvalidDB = false ) { $db = self::getDB( $database, $ignoreInvalidDB ); - if( $db ) { + if ( $db ) { $row = $db->selectRow( 'user', array( 'user_id', 'user_name' ), array( $field => $value ), __METHOD__ ); - if( $row !== false ) { + if ( $row !== false ) { return new UserRightsProxy( $db, $database, $row->user_name, intval( $row->user_id ) ); @@ -138,8 +138,8 @@ class UserRightsProxy { */ public static function getDB( $database, $ignoreInvalidDB = false ) { global $wgDBname; - if( self::validDatabase( $database ) ) { - if( $database == $wgDBname ) { + if ( $ignoreInvalidDB || self::validDatabase( $database ) ) { + if ( $database == $wgDBname ) { // Hmm... this shouldn't happen though. :) return wfGetDB( DB_MASTER ); } else { |