X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryFilearchive.php;h=6b926039dce92359d9a770b3ee883a5e332c7d3b;hb=b594c133f3a751e0729c0052a65985f17c6b7fd1;hp=f047d8d41464b80fae41b6a6ec830b63e68f1e3d;hpb=78f56b0753b6dc9683188c06601a7aa71e727f20;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index f047d8d414..6b926039dc 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -193,7 +193,7 @@ class ApiQueryFilearchive extends ApiQueryBase { $pageCount = ArchivedFile::newFromRow( $row )->pageCount(); if ( $pageCount !== false ) { - $vals['pagecount'] = $pageCount; + $file['pagecount'] = $pageCount; } $file['height'] = $row->fa_height; @@ -246,16 +246,8 @@ class ApiQueryFilearchive extends ApiQueryBase { public function getAllowedParams() { return array( 'from' => null, - 'continue' => null, 'to' => null, 'prefix' => null, - 'limit' => array( - ApiBase::PARAM_DFLT => 10, - ApiBase::PARAM_TYPE => 'limit', - ApiBase::PARAM_MIN => 1, - ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1, - ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 - ), 'dir' => array( ApiBase::PARAM_DFLT => 'ascending', ApiBase::PARAM_TYPE => array( @@ -283,48 +275,23 @@ class ApiQueryFilearchive extends ApiQueryBase { 'archivename', ), ), - ); - } - - public function getParamDescription() { - return array( - 'from' => 'The image title to start enumerating from', - 'continue' => 'When more results are available, use this to continue', - 'to' => 'The image title to stop enumerating at', - 'prefix' => 'Search for all image titles that begin with this value', - 'dir' => 'The direction in which to list', - 'limit' => 'How many images to return in total', - 'sha1' => "SHA1 hash of image. Overrides {$this->getModulePrefix()}sha1base36", - 'sha1base36' => 'SHA1 hash of image in base 36 (used in MediaWiki)', - 'prop' => array( - 'What image information to get:', - ' sha1 - Adds SHA-1 hash for the image', - ' timestamp - Adds timestamp for the uploaded version', - ' user - Adds user who uploaded the image version', - ' size - Adds the size of the image in bytes and the height, ' . - 'width and page count (if applicable)', - ' dimensions - Alias for size', - ' description - Adds description the image version', - ' parseddescription - Parse the description on the version', - ' mime - Adds MIME of the image', - ' mediatype - Adds the media type of the image', - ' metadata - Lists Exif metadata for the version of the image', - ' bitdepth - Adds the bit depth of the version', - ' archivename - Adds the file name of the archive version for non-latest versions' + 'limit' => array( + ApiBase::PARAM_DFLT => 10, + ApiBase::PARAM_TYPE => 'limit', + ApiBase::PARAM_MIN => 1, + ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1, + ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 + ), + 'continue' => array( + ApiBase::PARAM_HELP_MSG => 'api-help-param-continue', ), ); } - public function getDescription() { - return 'Enumerate all deleted files sequentially.'; - } - - public function getExamples() { + protected function getExamplesMessages() { return array( - 'api.php?action=query&list=filearchive' => array( - 'Simple Use', - 'Show a list of all deleted files', - ), + 'action=query&list=filearchive' + => 'apihelp-query+filearchive-example-simple', ); }