It has not been necessary to call this method outside the Database classes
since 1.11 (r23756 /
9382bc7a858c).
This is a breaking change and should not be merged before the following
changes to extensions:
* Disambiguator: Ibef942fd
* Maps: Ic90bd0ad
* OAI: Idbbe08d6
* Oversight: I63071e65
* Video: Id71914cd
Change-Id: Idfe7cd6f516f0aca850878282c47e7914accc6d8
'Project:Oversight' to 'Project:Suppress'.
* (T84937) Free external links ("autolinked" urls) will now be terminated
by and HTML entity encodings of  , <, and >.
+* DatabaseBase::resultObject() is now protected (use outside Database classes
+ not necessary since 1.11).
== Compatibility ==
return $this->__call( __FUNCTION__, func_get_args() );
}
- public function resultObject( $result ) {
- return $this->__call( __FUNCTION__, func_get_args() );
- }
-
public function ping() {
return $this->__call( __FUNCTION__, func_get_args() );
}
* Once upon a time, DatabaseBase::query() returned a bare MySQL result
* resource, and it was necessary to call this function to convert it to
* a wrapper. Nowadays, raw database objects are never exposed to external
- * callers, so this is unnecessary in external code. For compatibility with
- * old code, ResultWrapper objects are passed through unaltered.
+ * callers, so this is unnecessary in external code.
*
- * @param bool|ResultWrapper|resource $result
+ * @param bool|ResultWrapper|resource|object $result
* @return bool|ResultWrapper
*/
- public function resultObject( $result ) {
- if ( empty( $result ) ) {
+ protected function resultObject( $result ) {
+ if ( !$result ) {
return false;
} elseif ( $result instanceof ResultWrapper ) {
return $result;
* @param bool|MssqlResultWrapper|resource $result
* @return bool|MssqlResultWrapper
*/
- public function resultObject( $result ) {
- if ( empty( $result ) ) {
+ protected function resultObject( $result ) {
+ if ( !$result ) {
return false;
} elseif ( $result instanceof MssqlResultWrapper ) {
return $result;
*/
public function timestampOrNull( $ts = null );
- /**
- * Take the result from a query, and wrap it in a ResultWrapper if
- * necessary. Boolean values are passed through as is, to indicate success
- * of write queries or failure.
- *
- * Once upon a time, DatabaseBase::query() returned a bare MySQL result
- * resource, and it was necessary to call this function to convert it to
- * a wrapper. Nowadays, raw database objects are never exposed to external
- * callers, so this is unnecessary in external code. For compatibility with
- * old code, ResultWrapper objects are passed through unaltered.
- *
- * @param bool|ResultWrapper|resource $result
- * @return bool|ResultWrapper
- */
- public function resultObject( $result );
-
/**
* Ping the server and try to reconnect if it there is no connection
*