From: Chad Horohoe Date: Fri, 7 Jan 2011 20:25:52 +0000 (+0000) Subject: Remove ancient and deprecated newFromParams() constructor wrappers from various Datab... X-Git-Tag: 1.31.0-rc.0~32710 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=4ece90ed4b354c5ed0db48d6e5530c6924d3d317;p=lhc%2Fweb%2Fwiklou.git Remove ancient and deprecated newFromParams() constructor wrappers from various DatabaseBase implementations. Only callers are AskSql and WikiTrust. Both are calling the (very old) Database class anyway, so are obviously expecting a MySQL connection and can use the fallback (which yells wfDeprecated) in DatabaseBase --- diff --git a/includes/db/DatabaseIbm_db2.php b/includes/db/DatabaseIbm_db2.php index a3a6829b77..da86f0b373 100644 --- a/includes/db/DatabaseIbm_db2.php +++ b/includes/db/DatabaseIbm_db2.php @@ -428,23 +428,6 @@ ERROR; } } - /** - * Returns a fresh instance of this class - * - * @param $server String: hostname of database server - * @param $user String: username - * @param $password String - * @param $dbName String: database name on the server - * @param $flags Integer: database behaviour flags (optional, unused) - * @return DatabaseIbm_db2 object - */ - static function newFromParams( $server, $user, $password, $dbName, - $flags = 0 ) - { - return new DatabaseIbm_db2( $server, $user, $password, $dbName, - $flags ); - } - /** * Retrieves the most current database error * Forces a database rollback diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index c03ffbb7ea..5b3b335df0 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -49,10 +49,6 @@ class DatabaseMssql extends DatabaseBase { return false; } - static function newFromParams( $server, $user, $password, $dbName, $flags = 0 ) { - return new DatabaseMssql( $server, $user, $password, $dbName, $flags ); - } - /** * Usually aborts on failure */ diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index e15a8f0b4f..28af807822 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -226,11 +226,6 @@ class DatabaseOracle extends DatabaseBase { return true; } - static function newFromParams( $server, $user, $password, $dbName, $flags = 0 ) - { - return new DatabaseOracle( $server, $user, $password, $dbName, $flags ); - } - /** * Usually aborts on failure */ diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 86492b0ddb..b36240fb94 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -144,10 +144,6 @@ class DatabasePostgres extends DatabaseBase { return $this->numRows( $res ); } - static function newFromParams( $server, $user, $password, $dbName, $flags = 0 ) { - return new DatabasePostgres( $server, $user, $password, $dbName, $flags ); - } - /** * Usually aborts on failure */ diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 18420356f0..80bf092ebf 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -42,10 +42,6 @@ class DatabaseSqlite extends DatabaseBase { */ function implicitGroupby() { return false; } - static function newFromParams( $server, $user, $password, $dbName, $flags = 0 ) { - return new DatabaseSqlite( $server, $user, $password, $dbName, $flags ); - } - /** Open an SQLite database and return a resource handle to it * NOTE: only $dbName is used, the other parameters are irrelevant for SQLite databases */