diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /includes/api/ApiQueryImages.php | |
parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
Diffstat (limited to 'includes/api/ApiQueryImages.php')
-rw-r--r-- | includes/api/ApiQueryImages.php | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/includes/api/ApiQueryImages.php b/includes/api/ApiQueryImages.php index f2bf0a7b..9bc3abed 100644 --- a/includes/api/ApiQueryImages.php +++ b/includes/api/ApiQueryImages.php @@ -32,7 +32,7 @@ */ class ApiQueryImages extends ApiQueryGeneratorBase { - public function __construct( $query, $moduleName ) { + public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'im' ); } @@ -45,7 +45,7 @@ class ApiQueryImages extends ApiQueryGeneratorBase { } /** - * @param $resultPageSet ApiPageSet + * @param ApiPageSet $resultPageSet */ private function run( $resultPageSet = null ) { if ( $this->getPageSet()->getGoodTitleCount() == 0 ) { @@ -79,9 +79,9 @@ class ApiQueryImages extends ApiQueryGeneratorBase { $this->addOption( 'ORDER BY', 'il_to' . $sort ); } else { $this->addOption( 'ORDER BY', array( - 'il_from' . $sort, - 'il_to' . $sort - )); + 'il_from' . $sort, + 'il_to' . $sort + ) ); } $this->addOption( 'LIMIT', $params['limit'] + 1 ); @@ -164,28 +164,22 @@ class ApiQueryImages extends ApiQueryGeneratorBase { return array( 'limit' => 'How many images to return', 'continue' => 'When more results are available, use this to continue', - 'images' => 'Only list these images. Useful for checking whether a certain page has a certain Image.', + 'images' => 'Only list these images. Useful for checking whether a ' . + 'certain page has a certain Image.', 'dir' => 'The direction in which to list', ); } - public function getResultProperties() { - return array( - '' => array( - 'ns' => 'namespace', - 'title' => 'string' - ) - ); - } - public function getDescription() { - return 'Returns all images contained on the given page(s)'; + return 'Returns all images contained on the given page(s).'; } public function getExamples() { return array( - 'api.php?action=query&prop=images&titles=Main%20Page' => 'Get a list of images used in the [[Main Page]]', - 'api.php?action=query&generator=images&titles=Main%20Page&prop=info' => 'Get information about all images used in the [[Main Page]]', + 'api.php?action=query&prop=images&titles=Main%20Page' + => 'Get a list of images used in the [[Main Page]]', + 'api.php?action=query&generator=images&titles=Main%20Page&prop=info' + => 'Get information about all images used in the [[Main Page]]', ); } |