From 22525a27715cf03a99edc2a6679ed5706f8099df Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Mon, 23 Aug 2004 18:49:05 +0000 Subject: [PATCH] New global setting: wgUserTablePrefix set wgUserTablePrefix to the name of the DB where your users table is for single login. Disabled by default. If set, the users table will be fetched from another MySQL schema (called database by MySQL). Can not be on a different MySQL server, though. --- includes/Database.php | 4 ++++ includes/DefaultSettings.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/includes/Database.php b/includes/Database.php index d9adba7e8b..70735e821c 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -666,11 +666,15 @@ class Database { } function tableName( $name ) { + global $wgUserTablePrefix; if ( $this->mTablePrefix !== '' ) { if ( strpos( '.', $name ) === false ) { $name = $this->mTablePrefix . $name; } } + if ( isset( $wgUserTablePrefix ) && 'user' == $name ) { + $name = $wgUserTablePrefix . '.' . $name; + } return $name; } diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 11e5b17f0c..1892487e1f 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -541,6 +541,10 @@ $wgUseExternalDiffEngine = false; # Use RC Patrolling to check for vandalism $wgUseRCPatrol = true; +# set wgUserTablePrefix to the name of the DB where your users +# table is for single login. Disabled by default. +#$wgUserTablePrefix=''; + } else { die(); } -- 2.20.1