return NULL;
}
- /**
- * Format a table name ready for use in constructing an SQL query
- *
- * This does two important things: it brackets table names which as necessary,
- * and it adds a table prefix if there is one.
- *
- * All functions of this object which require a table name call this function
- * themselves. Pass the canonical name to such functions. This is only needed
- * when calling query() directly.
- *
- * @param $name String: database table name
- */
- function tableName( $name ) {
- global $wgSharedDB;
- # Skip quoted literals
- if ( $name != '' && $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
- if ( $name != '' ) $name = "[$name]";
- }
- }
- return $name;
- }
-
/**
* Return the next in a sequence, save the value for retrieval via insertId()
*/
return $retval;
}
- function tableName( $name ) {
- global $wgSharedDB, $wgSharedPrefix, $wgSharedTables;
+ function tableName( $name, $quoted ) {
/*
Replace reserved words with better ones
Using uppercase because that's the only way Oracle can handle
break;
}
- return parent::tableName( strtoupper( $name ) );
+ return parent::tableName( strtoupper( $name ), $quoted );
}
/**
return $res;
}
- function tableName( $name ) {
+ function tableName( $name, $quoted = true ) {
# Replace reserved words with better ones
switch( $name ) {
case 'user':
case 'text':
return 'pagecontent';
default:
- return $name;
+ return parent::tableName( $name, $quoted );
}
}