Merge "Use Html::element() to build the links used in 'alphaindexline' message"
[lhc/web/wiklou.git] / includes / api / ApiQueryFilearchive.php
index 7ec47fa..408c7c2 100644 (file)
@@ -77,10 +77,7 @@ class ApiQueryFilearchive extends ApiQueryBase {
 
                if ( !is_null( $params['continue'] ) ) {
                        $cont = explode( '|', $params['continue'] );
-                       if ( count( $cont ) != 1 ) {
-                               $this->dieUsage( "Invalid continue param. You should pass the " .
-                                       "original value returned by the previous query", "_badcontinue" );
-                       }
+                       $this->dieContinueUsageIf( count( $cont ) != 1 );
                        $op = $params['dir'] == 'descending' ? '<' : '>';
                        $cont_from = $db->addQuotes( $cont[0] );
                        $this->addWhere( "fa_name $op= $cont_from" );
@@ -210,7 +207,6 @@ class ApiQueryFilearchive extends ApiQueryBase {
                                $file['suppressed'] = '';
                        }
 
-
                        $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $file );
                        if ( !$fit ) {
                                $this->setContinueEnumParameter( 'continue', $row->fa_name );
@@ -222,7 +218,7 @@ class ApiQueryFilearchive extends ApiQueryBase {
        }
 
        public function getAllowedParams() {
-               return array (
+               return array(
                        'from' => null,
                        'continue' => null,
                        'to' => null,
@@ -285,7 +281,7 @@ class ApiQueryFilearchive extends ApiQueryBase {
                                ' 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',
+                               ' 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'
                        ),
@@ -366,7 +362,6 @@ class ApiQueryFilearchive extends ApiQueryBase {
                        array( 'code' => 'hashsearchdisabled', 'info' => 'Search by hash disabled in Miser Mode' ),
                        array( 'code' => 'invalidsha1hash', 'info' => 'The SHA1 hash provided is not valid' ),
                        array( 'code' => 'invalidsha1base36hash', 'info' => 'The SHA1Base36 hash provided is not valid' ),
-                       array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ),
                ) );
        }
 
@@ -378,8 +373,4 @@ class ApiQueryFilearchive extends ApiQueryBase {
                        ),
                );
        }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
 }