Index: trunk/phase3/includes/db/LoadBalancer.php |
— | — | @@ -639,12 +639,17 @@ |
640 | 640 | $dbname = $dbNameOverride; |
641 | 641 | } |
642 | 642 | |
| 643 | + if( !isset( $prefix ) ){ |
| 644 | + global $wgDBprefix; |
| 645 | + $prefix = $wgDBprefix; |
| 646 | + } |
| 647 | + |
643 | 648 | # Get class for this database type |
644 | 649 | $class = 'Database' . ucfirst( $type ); |
645 | 650 | |
646 | 651 | # Create object |
647 | 652 | wfDebug( "Connecting to $host $dbname...\n" ); |
648 | | - $db = new $class( $host, $user, $password, $dbname, 1, $flags ); |
| 653 | + $db = new $class( $host, $user, $password, $dbname, 1, $flags, $prefix ); |
649 | 654 | if ( $db->isOpen() ) { |
650 | 655 | wfDebug( "Connected\n" ); |
651 | 656 | } else { |