Author: leonardburton
Description:
I had trouble getting $wgSharedDB working and I uncovered an error on Database.php.
Line 984 reade: "if ( isset( $wgSharedDB ) && 'user' == $name ) {"
when it should read something like:
if (isset( $wgSharedDB ) && $this->mTablePrefix.'user' == $name ) {
It is not comparing the table prefixes
After the code edit it works on my installation.
Thanks,
Leonard
Original Code
function tableName( $name ) { global $wgSharedDB; # Skip quoted literals if ( $name{0} != '`' ) { if ( $this->mTablePrefix !== '' && strpos( '.', $name )
false ) {
$name = "{$this->mTablePrefix}$name"; } if ( isset( $wgSharedDB ) && 'user' == $name ) { $name = "`$wgSharedDB`.`$name`"; } else { # Standard quoting $name = "`$name`"; } } return $name; }
What I did for my purpose
function tableName( $name ) {
global $wgSharedDB; # Skip quoted literals if ( $name{0} != '`' ) { if ( $this->mTablePrefix !== '' && strpos( '.', $name )
false ) {
$name = "{$this->mTablePrefix}$name"; } if (isset( $wgSharedDB ) && $this->mTablePrefix.'user'
$name ) {
$name = "`$wgSharedDB`.`$name`"; } else { # Standard quoting $name = "`$name`"; } } return $name; }
Version: 1.5.x
Severity: normal
URL: http://aroip.com/el/