r93103 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93102‎ | r93103 | r93104 >
Date:20:08, 25 July 2011
Author:platonides
Status:ok
Tags:
Comment:
r85886 broke $wgSharedPrefix
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -1883,6 +1883,12 @@
18841884 }
18851885 $prefix = $this->mTablePrefix; # Default prefix
18861886
 1887+ # A database name has been specified in input. We don't want any
 1888+ # prefixes added.
 1889+ if ( isset( $database ) ) {
 1890+ $prefix = '';
 1891+ }
 1892+
18871893 # Note that we use the long format because php will complain in in_array if
18881894 # the input is not an array, and will complain in is_array if it is not set.
18891895 if ( !isset( $database ) # Don't use shared database if pre selected.
@@ -1898,7 +1904,6 @@
18991905 # Quote the $database and $table and apply the prefix if not quoted.
19001906 if ( isset( $database ) ) {
19011907 $database = ( !$quoted || $this->isQuotedIdentifier( $database ) ? $database : $this->addIdentifierQuotes( $database ) );
1902 - $prefix = '';
19031908 }
19041909
19051910 $table = "{$prefix}{$table}";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85886No need to quote just to avoid the prefixes.platonides16:57, 12 April 2011

Status & tagging log