summaryrefslogtreecommitdiff
path: root/includes/UserRightsProxy.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/UserRightsProxy.php')
-rw-r--r--includes/UserRightsProxy.php10
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 {