* $conds may be "*" to copy the whole table
* srcTable may be an array of tables.
*/
- function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'Database::insertSelect',
- $options = array() )
+ function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'Database::insertSelect',
+ $options = array() )
{
$destTable = $this->tableName( $destTable );
if ( is_array( $options ) ) {
}
if( is_array( $srcTable ) ) {
$srcTable = implode( ',', array_map( array( &$this, 'tableName' ), $srcTable ) );
- } else {
+ } else {
$srcTable = $this->tableName( $srcTable );
}
$sql = "INSERT $options INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ')' .
- ' SELECT ' . implode( ',', $varMap ) .
+ ' SELECT ' . implode( ',', $varMap ) .
" FROM $srcTable";
if ( $conds != '*' ) {
$sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND );
}
/**
- * Read and execute SQL commands from a file.
+ * Read and execute SQL commands from a file.
* Returns true on success, error string on failure
*/
function sourceFile( $filename ) {
}
// Table prefixes
- $ins = preg_replace_callback( '/\/\*(?:\$wgDBprefix|_)\*\/([a-z_]*)/',
+ $ins = preg_replace_callback( '/\/\*(?:\$wgDBprefix|_)\*\/([a-z_]*)/',
array( &$this, 'tableNameCallback' ), $ins );
return $ins;
}