X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryBase.php;h=44526e88b1e43d7ea7af8f54c7d8a458eb09e00a;hb=6c9a2923fe1ee3a65cb027be5e781772f2b12fbd;hp=87bb6a79d00eee534ebb8954a89931542870701c;hpb=207191ef15376419ea61395ae08af332a73705b6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 87bb6a79d0..44526e88b1 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -24,6 +24,7 @@ * @file */ +use Wikimedia\Rdbms\IDatabase; use Wikimedia\Rdbms\ResultWrapper; /** @@ -105,7 +106,7 @@ abstract class ApiQueryBase extends ApiBase { /** * Get the Query database connection (read-only) - * @return Database + * @return IDatabase */ protected function getDB() { if ( is_null( $this->mDb ) ) { @@ -121,7 +122,7 @@ abstract class ApiQueryBase extends ApiBase { * @param string $name Name to assign to the database connection * @param int $db One of the DB_* constants * @param array $groups Query groups - * @return Database + * @return IDatabase */ public function selectNamedDB( $name, $db, $groups ) { $this->mDb = $this->getQuery()->getNamedDB( $name, $db, $groups ); @@ -355,7 +356,6 @@ abstract class ApiQueryBase extends ApiBase { * @return ResultWrapper */ protected function select( $method, $extraQuery = [], array &$hookData = null ) { - $tables = array_merge( $this->tables, isset( $extraQuery['tables'] ) ? (array)$extraQuery['tables'] : [] @@ -478,7 +478,7 @@ abstract class ApiQueryBase extends ApiBase { /** * Add information (title and namespace) about a Title object to a * result array - * @param array $arr Result array à la ApiResult + * @param array &$arr Result array à la ApiResult * @param Title $title * @param string $prefix Module prefix */