* (bug 709) Cannot rename/move images and other media files [EXPERIMENTAL]
* Custom rollback summaries now accept the same arguments as the default message
* (bug 12542) Added hooks for expansion of Special:Listusers
+* Added new variable $wgSharedDBtables for altering the list of tables which are
+ shared when $wgSharedDB is enabled.
=== Bug fixes in 1.13 ===
* @param string $name database table name
*/
function tableName( $name ) {
- global $wgSharedDB;
+ global $wgSharedDB, $wgSharedDBtables;
# Skip quoted literals
if ( $name{0} != '`' ) {
if ( $this->mTablePrefix !== '' && strpos( $name, '.' ) === false ) {
$name = "{$this->mTablePrefix}$name";
}
- if ( isset( $wgSharedDB ) && "{$this->mTablePrefix}user" == $name ) {
+ if ( isset( $wgSharedDB ) && isset( $wgSharedDBtables )
+ && substr( $name, 0, strlen($this->mTablePrefix) ) == $this->mTablePrefix
+ && in_array( substr( $name, strlen($this->mTablePrefix) ), $wgSharedDBtables ) ) {
$name = "`$wgSharedDB`.`$name`";
} else {
# Standard quoting
*/
$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.
+ * EXPERIMENTAL
+ */
+$wgSharedDBtables = array( 'user' );
+
/**
* Database load balancer
* This is a two-dimensional array, an array of server info structures