fix some spacing
[lhc/web/wiklou.git] / includes / api / ApiQueryImages.php
index 2ef6fa5..f2bf0a7 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Created on May 13, 2007
  *
- * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
+ * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
         */
        private function run( $resultPageSet = null ) {
                if ( $this->getPageSet()->getGoodTitleCount() == 0 ) {
-                       return; // nothing to do
+                       return; // nothing to do
                }
 
                $params = $this->extractRequestParams();
@@ -62,10 +62,7 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
                $this->addWhereFld( 'il_from', array_keys( $this->getPageSet()->getGoodTitles() ) );
                if ( !is_null( $params['continue'] ) ) {
                        $cont = explode( '|', $params['continue'] );
-                       if ( count( $cont ) != 2 ) {
-                               $this->dieUsage( 'Invalid continue param. You should pass the ' .
-                                       'original value returned by the previous query', '_badcontinue' );
-                       }
+                       $this->dieContinueUsageIf( count( $cont ) != 2 );
                        $op = $params['dir'] == 'descending' ? '<' : '>';
                        $ilfrom = intval( $cont[0] );
                        $ilto = $this->getDB()->addQuotes( $cont[1] );
@@ -185,12 +182,6 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
                return 'Returns all images contained on the given page(s)';
        }
 
-       public function getPossibleErrors() {
-               return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ),
-               ) );
-       }
-
        public function getExamples() {
                return array(
                        'api.php?action=query&prop=images&titles=Main%20Page' => 'Get a list of images used in the [[Main Page]]',
@@ -201,8 +192,4 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
        public function getHelpUrls() {
                return 'https://www.mediawiki.org/wiki/API:Properties#images_.2F_im';
        }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
 }