diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-12-27 15:41:37 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-12-31 11:43:28 +0100 |
commit | c1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch) | |
tree | 2b38796e738dd74cb42ecd9bfd151803108386bc /includes/api/ApiQueryImages.php | |
parent | b88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff) |
Update to MediaWiki 1.24.1
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]]', ); } |