* @param string $name database table name
*/
function tableName( $name ) {
- global $wgSharedDB, $wgSharedDBtables;
+ global $wgSharedDB;
# Skip quoted literals
if ( $name{0} != '`' ) {
if ( $this->mTablePrefix !== '' && strpos( $name, '.' ) === false ) {
$name = "{$this->mTablePrefix}$name";
}
- if ( isset( $wgSharedDB ) && isset( $wgSharedDBtables )
- && substr( $name, 0, strlen($this->mTablePrefix) ) == $this->mTablePrefix
- && in_array( substr( $name, strlen($this->mTablePrefix) ), $wgSharedDBtables ) ) {
+ if ( isset( $wgSharedDB ) && "{$this->mTablePrefix}user" == $name ) {
$name = "`$wgSharedDB`.`$name`";
} else {
# Standard quoting
/** Live high performance sites should disable this - some checks acquire giant mysql locks */
$wgCheckDBSchema = true;
-/**
- * Shared database for multiple wikis.
- * The server for this database must be the same as for the main database.
- * EXPERIMENTAL
- */
-$wgSharedDB = null;
/**
- * List of database tables (without prefixes) to share when $wgSharedDB is enabled.
- * This only includes the user table by default for backwards compatibility.
- * However you may remove it so that you can enable extensions using the shared
- * DB without having shared users. Or you can add in another table, such as
- * interwiki to force MediaWiki to use the shared version of the table instead.
- *
- * Be carefull with sharing tables. The images, revisions, pages, and many of
- * the other tables may have bad side effects if you share them.
+ * 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
*/
-$wgSharedDBtables = array( 'user' );
+$wgSharedDB = null;
/**
* Database load balancer