X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQuery.php;h=31bcc7a704d170c90dd8edef4b5feb17df68b253;hp=e6f3fc45f7a83bd23507322077472e5c0a3312f0;hb=c75f0e95c9888489961548c72ef24786c43838aa;hpb=6c9a2923fe1ee3a65cb027be5e781772f2b12fbd diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index e6f3fc45f7..31bcc7a704 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -169,7 +169,7 @@ class ApiQuery extends ApiBase { * as the first, regardless of the values of $db and $groups * @param string $name Name to assign to the database connection * @param int $db One of the DB_* constants - * @param array $groups Query groups + * @param string|string[] $groups Query groups * @return IDatabase */ public function getNamedDB( $name, $db, $groups ) { @@ -245,7 +245,7 @@ class ApiQuery extends ApiBase { $cacheMode = $this->mPageSet->getCacheMode(); // Execute all unfinished modules - /** @var $module ApiQueryBase */ + /** @var ApiQueryBase $module */ foreach ( $modules as $module ) { $params = $module->extractRequestParams(); $cacheMode = $this->mergeCacheMode( @@ -381,7 +381,7 @@ class ApiQuery extends ApiBase { ]; } // Report special pages - /** @var $title Title */ + /** @var Title $title */ foreach ( $pageSet->getSpecialTitles() as $fakeId => $title ) { $vals = []; ApiQueryBase::addTitleInfo( $vals, $title ); @@ -434,7 +434,7 @@ class ApiQuery extends ApiBase { $titles = $pageSet->getGoodTitles(); if ( count( $titles ) ) { $user = $this->getUser(); - /** @var $title Title */ + /** @var Title $title */ foreach ( $titles as $title ) { if ( $title->userCan( 'read', $user ) ) { $exportTitles[] = $title; @@ -459,6 +459,7 @@ class ApiQuery extends ApiBase { // Raw formatter will handle this $result->addValue( null, 'text', $sink, ApiResult::NO_SIZE_CHECK ); $result->addValue( null, 'mime', 'text/xml', ApiResult::NO_SIZE_CHECK ); + $result->addValue( null, 'filename', 'export.xml', ApiResult::NO_SIZE_CHECK ); } else { $result->addValue( 'query', 'export', $sink, ApiResult::NO_SIZE_CHECK ); $result->addValue( 'query', ApiResult::META_BC_SUBELEMENTS, [ 'export' ] );