From: Jens Frank Date: Mon, 23 Aug 2004 18:49:05 +0000 (+0000) Subject: New global setting: wgUserTablePrefix X-Git-Tag: 1.5.0alpha1~2243 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=22525a27715cf03a99edc2a6679ed5706f8099df;p=lhc%2Fweb%2Fwiklou.git 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. --- 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(); }