From: Umherirrender Date: Fri, 7 Jun 2019 15:19:48 +0000 (+0200) Subject: Change array type on ApiQueryBase::addTables X-Git-Tag: 1.34.0-rc.0~1493 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=7cc76abc3621fe8aaac0c76cc5608efcb79cbc56;p=lhc%2Fweb%2Fwiklou.git Change array type on ApiQueryBase::addTables This function results in passing its value to IDatabase::select as first parameter $table. The first parameter is documented as string|array, because it can take more complex arrays: * Joins using parentheses for grouping (since MediaWiki 1.31) may be * constructed using nested arrays. For example, * * [ 'tableA', 'nestedB' => [ 'tableB', 'b2' => 'tableB2' ] ] Update the type to allow also passing such complex arrays to this function ApiQueryBase::showHiddenUsersAddBlockInfo() is using this format Change-Id: I8038243545bc1c79a1106ccc3bec7738e63c2e2e --- diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 25053345af..47ff0fb921 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -151,7 +151,8 @@ abstract class ApiQueryBase extends ApiBase { /** * Add a set of tables to the internal array - * @param string|string[] $tables Table name or array of table names + * @param string|array $tables Table name or array of table names + * or nested arrays for joins using parentheses for grouping * @param string|null $alias Table alias, or null for no alias. Cannot be * used with multiple tables */