From: Erik Moeller Date: Sat, 28 Aug 2004 13:32:14 +0000 (+0000) Subject: rename $wgUserTablePrefix to $wgSharedDB as discussed on #mediawiki X-Git-Tag: 1.5.0alpha1~2218 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=76ea9e622054fa1346119314d7703bf70b576209;p=lhc%2Fweb%2Fwiklou.git rename $wgUserTablePrefix to $wgSharedDB as discussed on #mediawiki --- diff --git a/includes/Database.php b/includes/Database.php index 70735e821c..ac3f06ec14 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -666,14 +666,14 @@ class Database { } function tableName( $name ) { - global $wgUserTablePrefix; + global $wgSharedDB; if ( $this->mTablePrefix !== '' ) { if ( strpos( '.', $name ) === false ) { $name = $this->mTablePrefix . $name; } } - if ( isset( $wgUserTablePrefix ) && 'user' == $name ) { - $name = $wgUserTablePrefix . '.' . $name; + if ( isset( $wgSharedDB ) && 'user' == $name ) { + $name = $wgSharedDB . '.' . $name; } return $name; } diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 7ce451804b..28656591d1 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -74,6 +74,13 @@ $wgDBuser = 'wikiuser'; $wgDBtype = "mysql"; # "mysql" for working code and "PostgreSQL" for development/broken code $wgDBprefix = ''; # Table name prefix +# Shared database for multiple wikis. +# Presently used for storing a user table for single sign-on +# The server for this database must be the same as for the main +# database. +# EXPERIMENTAL +# $wgSharedDB=''; + # Database load balancer # This is a two-dimensional array, an array of server info structures # Fields are: @@ -542,10 +549,6 @@ $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(); }