r4915 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r4914‎ | r4915 | r4916 >
Date:18:49, 23 August 2004
Author:jeluf
Status:old
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/Database.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -541,6 +541,10 @@
542542 # Use RC Patrolling to check for vandalism
543543 $wgUseRCPatrol = true;
544544
 545+# set wgUserTablePrefix to the name of the DB where your users
 546+# table is for single login. Disabled by default.
 547+#$wgUserTablePrefix='';
 548+
545549 } else {
546550 die();
547551 }
Index: trunk/phase3/includes/Database.php
@@ -666,11 +666,15 @@
667667 }
668668
669669 function tableName( $name ) {
 670+ global $wgUserTablePrefix;
670671 if ( $this->mTablePrefix !== '' ) {
671672 if ( strpos( '.', $name ) === false ) {
672673 $name = $this->mTablePrefix . $name;
673674 }
674675 }
 676+ if ( isset( $wgUserTablePrefix ) && 'user' == $name ) {
 677+ $name = $wgUserTablePrefix . '.' . $name;
 678+ }
675679 return $name;
676680 }
677681

Status & tagging log