Index: trunk/extensions/SQL2Wiki/SQL2Wiki.body.php |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | wfSuppressWarnings(); |
89 | 89 | $db = $wgExSql2WikiDatabases[$this->mArgs["database"]]; |
90 | 90 | $this->mDBType = $db['type']; |
91 | | - $this->mDB = Database::newFromType( $this->mDBType, $db ); |
| 91 | + $this->mDB = DatabaseBase::factory( $this->mDBType, $db ); |
92 | 92 | wfRestoreWarnings(); |
93 | 93 | } catch ( Exception $ex) { |
94 | 94 | $lastError = $ex->getMessage(); |
Index: trunk/extensions/WikiTrust/sql/create_db.php |
— | — | @@ -103,7 +103,7 @@ |
104 | 104 | } |
105 | 105 | |
106 | 106 | // We need root priveledges to do this. |
107 | | -$db_root = DatabaseBase::newFromType( $wgDBtype, |
| 107 | +$db_root = DatabaseBase::factory( $wgDBtype, |
108 | 108 | array( |
109 | 109 | 'host' => $wgDBserver, |
110 | 110 | 'user' => $dba, |
Index: trunk/extensions/ExternalData/ED_Utils.php |
— | — | @@ -184,9 +184,9 @@ |
185 | 185 | |
186 | 186 | // DatabaseBase::newFromType() was added in MW 1.17 - it was |
187 | 187 | // then replaced by DatabaseBase::factory() in MW 1.18 |
188 | | - $factorFunction = array( 'DatabaseBase', 'factory' ); |
| 188 | + $factoryFunction = array( 'DatabaseBase', 'factory' ); |
189 | 189 | $newFromTypeFunction = array( 'DatabaseBase', 'newFromType' ); |
190 | | - if ( is_callable( $factorFunction ) ) { |
| 190 | + if ( is_callable( $factoryFunction ) ) { |
191 | 191 | $db = DatabaseBase::factory( $db_type, |
192 | 192 | array( |
193 | 193 | 'host' => $db_server, |
Index: trunk/extensions/Asksql/Asksql_body.php |
— | — | @@ -13,8 +13,6 @@ |
14 | 14 | function execute( $par ) { |
15 | 15 | global $wgAllowSysopQueries, $wgUser, $wgRequest, $wgOut; |
16 | 16 | |
17 | | - |
18 | | - |
19 | 17 | if ( !$wgAllowSysopQueries ) { |
20 | 18 | throw new ErrorPageError( 'nosuchspecialpage', 'nospecialpagetext' ); |
21 | 19 | } |
— | — | @@ -52,7 +50,7 @@ |
53 | 51 | } |
54 | 52 | |
55 | 53 | function showForm( $err ) { |
56 | | - global $wgOut, $wgUser, $wgLang; |
| 54 | + global $wgOut; |
57 | 55 | global $wgLogQueries; |
58 | 56 | |
59 | 57 | $wgOut->setPagetitle( wfMsg( 'asksql' ) ); |
— | — | @@ -82,8 +80,8 @@ |
83 | 81 | } |
84 | 82 | |
85 | 83 | function doSubmit() { |
86 | | - global $wgOut, $wgUser, $wgServer, $wgLang, $wgContLang; |
87 | | - global $wgDBserver, $wgDBsqluser, $wgDBsqlpassword, $wgDBname, $wgSqlTimeout; |
| 84 | + global $wgOut, $wgUser, $wgContLang; |
| 85 | + global $wgDBserver, $wgDBsqluser, $wgDBsqlpassword, $wgDBname; |
88 | 86 | global $wgDBtype; |
89 | 87 | |
90 | 88 | # Use a limit, folks! |
— | — | @@ -93,12 +91,12 @@ |
94 | 92 | $this->query .= ' LIMIT 100'; |
95 | 93 | } |
96 | 94 | |
97 | | - $conn = DatabaseBase::newFromType( $wgDBtype, |
| 95 | + $conn = DatabaseBase::factory( $wgDBtype, |
98 | 96 | array( |
99 | | - 'host' => $wgDBserver, |
100 | | - 'user' => $wgDBsqluser, |
101 | | - 'password' => $wgDBsqlpassword, |
102 | | - 'dbname' => $wgDBname |
| 97 | + 'host' => $wgDBserver, |
| 98 | + 'user' => $wgDBsqluser, |
| 99 | + 'password' => $wgDBsqlpassword, |
| 100 | + 'dbname' => $wgDBname |
103 | 101 | ) |
104 | 102 | ); |
105 | 103 | |
— | — | @@ -111,7 +109,6 @@ |
112 | 110 | # $conn->stopTimer(); |
113 | 111 | $this->logFinishedQuery(); |
114 | 112 | |
115 | | - $n = 0; |
116 | 113 | @$n = $conn->numFields( $res ); |
117 | 114 | $titleList = false; |
118 | 115 | |