From 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Dec 2013 09:55:49 +0100 Subject: Update to MediaWiki 1.22.0 --- includes/UserRightsProxy.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'includes/UserRightsProxy.php') 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 { -- cgit v1.2.2