Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -577,27 +577,16 @@ |
578 | 578 | /** Live high performance sites should disable this - some checks acquire giant mysql locks */ |
579 | 579 | $wgCheckDBSchema = true; |
580 | 580 | |
| 581 | + |
581 | 582 | /** |
582 | | - * Shared database for multiple wikis. |
583 | | - * The server for this database must be the same as for the main database. |
| 583 | + * Shared database for multiple wikis. Presently used for storing a user table |
| 584 | + * for single sign-on. The server for this database must be the same as for the |
| 585 | + * main database. |
584 | 586 | * EXPERIMENTAL |
585 | 587 | */ |
586 | 588 | $wgSharedDB = null; |
587 | 589 | |
588 | 590 | /** |
589 | | - * List of database tables (without prefixes) to share when $wgSharedDB is enabled. |
590 | | - * This only includes the user table by default for backwards compatibility. |
591 | | - * However you may remove it so that you can enable extensions using the shared |
592 | | - * DB without having shared users. Or you can add in another table, such as |
593 | | - * interwiki to force MediaWiki to use the shared version of the table instead. |
594 | | - * |
595 | | - * Be carefull with sharing tables. The images, revisions, pages, and many of |
596 | | - * the other tables may have bad side effects if you share them. |
597 | | - * EXPERIMENTAL |
598 | | - */ |
599 | | -$wgSharedDBtables = array( 'user' ); |
600 | | - |
601 | | -/** |
602 | 591 | * Database load balancer |
603 | 592 | * This is a two-dimensional array, an array of server info structures |
604 | 593 | * Fields are: |
Index: trunk/phase3/includes/Database.php |
— | — | @@ -1365,15 +1365,13 @@ |
1366 | 1366 | * @param string $name database table name |
1367 | 1367 | */ |
1368 | 1368 | function tableName( $name ) { |
1369 | | - global $wgSharedDB, $wgSharedDBtables; |
| 1369 | + global $wgSharedDB; |
1370 | 1370 | # Skip quoted literals |
1371 | 1371 | if ( $name{0} != '`' ) { |
1372 | 1372 | if ( $this->mTablePrefix !== '' && strpos( $name, '.' ) === false ) { |
1373 | 1373 | $name = "{$this->mTablePrefix}$name"; |
1374 | 1374 | } |
1375 | | - if ( isset( $wgSharedDB ) && isset( $wgSharedDBtables ) |
1376 | | - && substr( $name, 0, strlen($this->mTablePrefix) ) == $this->mTablePrefix |
1377 | | - && in_array( substr( $name, strlen($this->mTablePrefix) ), $wgSharedDBtables ) ) { |
| 1375 | + if ( isset( $wgSharedDB ) && "{$this->mTablePrefix}user" == $name ) { |
1378 | 1376 | $name = "`$wgSharedDB`.`$name`"; |
1379 | 1377 | } else { |
1380 | 1378 | # Standard quoting |