Index: trunk/phase3/includes/db/DatabaseMysql.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | return 'mysql'; |
20 | 20 | } |
21 | 21 | |
22 | | - /*private*/ function doQuery( $sql ) { |
| 22 | + protected function doQuery( $sql ) { |
23 | 23 | if( $this->bufferResults() ) { |
24 | 24 | $ret = mysql_query( $sql, $this->mConn ); |
25 | 25 | } else { |
Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -302,7 +302,7 @@ |
303 | 303 | return $this->mTrxLevel ? OCI_NO_AUTO_COMMIT : OCI_COMMIT_ON_SUCCESS; |
304 | 304 | } |
305 | 305 | |
306 | | - function doQuery( $sql ) { |
| 306 | + protected function doQuery( $sql ) { |
307 | 307 | wfDebug( "SQL: [$sql]\n" ); |
308 | 308 | if ( !mb_check_encoding( $sql ) ) { |
309 | 309 | throw new MWException( "SQL encoding is invalid\n$sql" ); |
Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -246,7 +246,7 @@ |
247 | 247 | } |
248 | 248 | } |
249 | 249 | |
250 | | - function doQuery( $sql ) { |
| 250 | + protected function doQuery( $sql ) { |
251 | 251 | if ( function_exists( 'mb_convert_encoding' ) ) { |
252 | 252 | $sql = mb_convert_encoding( $sql, 'UTF-8' ); |
253 | 253 | } |
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -453,10 +453,8 @@ |
454 | 454 | * The DBMS-dependent part of query() |
455 | 455 | * @param $sql String: SQL query. |
456 | 456 | * @return object Result object for fetch functions or false on failure |
457 | | - * @access private |
458 | 457 | */ |
459 | | - /*private*/ |
460 | | - public function doQuery( $sql ) { |
| 458 | + protected function doQuery( $sql ) { |
461 | 459 | $this->applySchema(); |
462 | 460 | |
463 | 461 | // Needed to handle any UTF-8 encoding issues in the raw sql |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -1044,7 +1044,7 @@ |
1045 | 1045 | * @return Array |
1046 | 1046 | * @see DatabaseBase::select() |
1047 | 1047 | */ |
1048 | | - protected function makeSelectOptions( $options ) { |
| 1048 | + function makeSelectOptions( $options ) { |
1049 | 1049 | $preLimitTail = $postLimitTail = ''; |
1050 | 1050 | $startOpts = ''; |
1051 | 1051 | |
— | — | @@ -1517,7 +1517,7 @@ |
1518 | 1518 | * @param $options array |
1519 | 1519 | * @return string |
1520 | 1520 | */ |
1521 | | - protected function makeInsertOptions( $options ) { |
| 1521 | + function makeInsertOptions( $options ) { |
1522 | 1522 | return implode( ' ', $options ); |
1523 | 1523 | } |
1524 | 1524 | |
— | — | @@ -1602,7 +1602,7 @@ |
1603 | 1603 | * @param $options Array: The options passed to DatabaseBase::update |
1604 | 1604 | * @return string |
1605 | 1605 | */ |
1606 | | - protected function makeUpdateOptions( $options ) { |
| 1606 | + function makeUpdateOptions( $options ) { |
1607 | 1607 | if ( !is_array( $options ) ) { |
1608 | 1608 | $options = array( $options ); |
1609 | 1609 | } |
— | — | @@ -2758,10 +2758,15 @@ |
2759 | 2759 | /** |
2760 | 2760 | * Take the result from a query, and wrap it in a ResultWrapper if |
2761 | 2761 | * necessary. Boolean values are passed through as is, to indicate success |
2762 | | - * of write queries or failure. ResultWrapper objects are also passed |
2763 | | - * through. |
| 2762 | + * of write queries or failure. |
| 2763 | + * |
| 2764 | + * Once upon a time, DatabaseBase::query() returned a bare MySQL result |
| 2765 | + * resource, and it was necessary to call this function to convert it to |
| 2766 | + * a wrapper. Nowadays, raw database objects are never exposed to external |
| 2767 | + * callers, so this is unnecessary in external code. For compatibility with |
| 2768 | + * old code, ResultWrapper objects are passed through unaltered. |
2764 | 2769 | */ |
2765 | | - protected function resultObject( $result ) { |
| 2770 | + function resultObject( $result ) { |
2766 | 2771 | if ( empty( $result ) ) { |
2767 | 2772 | return false; |
2768 | 2773 | } elseif ( $result instanceof ResultWrapper ) { |
Index: trunk/phase3/includes/db/DatabaseMssql.php |
— | — | @@ -117,7 +117,7 @@ |
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
121 | | - function doQuery( $sql ) { |
| 121 | + protected function doQuery( $sql ) { |
122 | 122 | wfDebug( "SQL: [$sql]\n" ); |
123 | 123 | $this->offset = 0; |
124 | 124 | |
Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | * |
215 | 215 | * @return ResultWrapper |
216 | 216 | */ |
217 | | - function doQuery( $sql ) { |
| 217 | + protected function doQuery( $sql ) { |
218 | 218 | $res = $this->mConn->query( $sql ); |
219 | 219 | if ( $res === false ) { |
220 | 220 | return false; |