}
$prefix = $this->mTablePrefix; # Default prefix
- # A database name has been specified in input. Quote the table name
- # because we don't want any prefixes added.
- if ( isset( $database ) ) {
- $table = ( $this->isQuotedIdentifier( $table ) ? $table : $this->addIdentifierQuotes( $table ) );
- }
-
# Note that we use the long format because php will complain in in_array if
# the input is not an array, and will complain in is_array if it is not set.
if ( !isset( $database ) # Don't use shared database if pre selected.
# Quote the $database and $table and apply the prefix if not quoted.
if ( isset( $database ) ) {
$database = ( $this->isQuotedIdentifier( $database ) ? $database : $this->addIdentifierQuotes( $database ) );
+ $prefix = '';
}
$table = ( $this->isQuotedIdentifier( $table ) ? $table : $this->addIdentifierQuotes( "{$prefix}{$table}" ) );