summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryImages.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /includes/api/ApiQueryImages.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/api/ApiQueryImages.php')
-rw-r--r--includes/api/ApiQueryImages.php30
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]]',
);
}