diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-01-12 13:42:29 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-01-12 13:42:29 +0100 |
commit | ba0fc4fa20067528effd4802e53ceeb959640825 (patch) | |
tree | 4f62217349d3afa39dbba3f7e19dac0aecb344f6 /includes/db | |
parent | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (diff) |
Update to MediaWiki 1.18.1
Diffstat (limited to 'includes/db')
-rw-r--r-- | includes/db/Database.php | 13 | ||||
-rw-r--r-- | includes/db/DatabaseMysql.php | 2 | ||||
-rw-r--r-- | includes/db/DatabaseOracle.php | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/includes/db/Database.php b/includes/db/Database.php index 75e6a91d..d1a3b2bd 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -590,6 +590,19 @@ abstract class DatabaseBase implements DatabaseType { } /** + * Same as new factory( ... ), kept for backward compatibility + * @deprecated since 1.18 + * @see Database::factory() + */ + public final static function newFromType( $dbType, $p = array() ) { + wfDeprecated( __METHOD__ ); + if ( isset( $p['tableprefix'] ) ) { + $p['tablePrefix'] = $p['tableprefix']; + } + return self::factory( $dbType, $p ); + } + + /** * Given a DB type, construct the name of the appropriate child class of * DatabaseBase. This is designed to replace all of the manual stuff like: * $class = 'Database' . ucfirst( strtolower( $type ) ); diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index 9cbd455e..6a81f234 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -709,7 +709,7 @@ class DatabaseMysql extends DatabaseBase { protected function getDefaultSchemaVars() { $vars = parent::getDefaultSchemaVars(); $vars['wgDBTableOptions'] = str_replace( 'TYPE', 'ENGINE', $GLOBALS['wgDBTableOptions'] ); - $vars['wgDBTableOptions'] = str_replace( 'CHARSET=mysql4', 'CHARSET=binary', $GLOBALS['wgDBTableOptions'] ); + $vars['wgDBTableOptions'] = str_replace( 'CHARSET=mysql4', 'CHARSET=binary', $vars['wgDBTableOptions'] ); return $vars; } diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index b64e66c2..9d51cf07 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -1175,9 +1175,7 @@ class DatabaseOracle extends DatabaseBase { // a hack for deleting pages, users and images (which have non-nullable FKs) // all deletions on these tables have transactions so final failure rollbacks these updates $table = $this->tableName( $table ); - if ( $table == $this->tableName( 'page' ) ) { - $this->update( 'recentchanges', array( 'rc_cur_id' => 0 ), array( 'rc_cur_id' => $conds['page_id'] ), $fname ); - } elseif ( $table == $this->tableName( 'user' ) ) { + if ( $table == $this->tableName( 'user' ) ) { $this->update( 'archive', array( 'ar_user' => 0 ), array( 'ar_user' => $conds['user_id'] ), $fname ); $this->update( 'ipblocks', array( 'ipb_user' => 0 ), array( 'ipb_user' => $conds['user_id'] ), $fname ); $this->update( 'image', array( 'img_user' => 0 ), array( 'img_user' => $conds['user_id'] ), $fname ); |