Merge "Followup I888c616e: Keep IRC line format unchanged."
[lhc/web/wiklou.git] / includes / api / ApiQueryBacklinks.php
index 7491bbb..0df2899 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Created on Oct 16, 2006
  *
- * 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
@@ -406,20 +406,14 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                // null stuff out now so we know what's set and what isn't
                $this->rootTitle = $this->contID = $this->redirID = null;
                $rootNs = intval( $continueList[0] );
-               if ( $rootNs === 0 && $continueList[0] !== '0' ) {
-                       // Illegal continue parameter
-                       $this->dieUsage( 'Invalid continue param. You should pass the original value returned by the previous query', '_badcontinue' );
-               }
+               $this->dieContinueUsageIf( $rootNs === 0 && $continueList[0] !== '0' );
+
                $this->rootTitle = Title::makeTitleSafe( $rootNs, $continueList[1] );
+               $this->dieContinueUsageIf( !$this->rootTitle );
 
-               if ( !$this->rootTitle ) {
-                       $this->dieUsage( 'Invalid continue param. You should pass the original value returned by the previous query', '_badcontinue' );
-               }
                $contID = intval( $continueList[2] );
+               $this->dieContinueUsageIf( $contID === 0 && $continueList[2] !== '0' );
 
-               if ( $contID === 0 && $continueList[2] !== '0' ) {
-                       $this->dieUsage( 'Invalid continue param. You should pass the original value returned by the previous query', '_badcontinue' );
-               }
                $this->contID = $contID;
                $id2 = isset( $continueList[3] ) ? $continueList[3] : null;
                $redirID = intval( $id2 );
@@ -455,12 +449,12 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_TYPE => 'namespace'
                        ),
-                       'dir' => array(\r
-                               ApiBase::PARAM_DFLT => 'ascending',\r
-                               ApiBase::PARAM_TYPE => array(\r
-                                       'ascending',\r
-                                       'descending'\r
-                               )\r
+                       'dir' => array(
+                               ApiBase::PARAM_DFLT => 'ascending',
+                               ApiBase::PARAM_TYPE => array(
+                                       'ascending',
+                                       'descending'
+                               )
                        ),
                        'filterredir' => array(
                                ApiBase::PARAM_DFLT => 'all',
@@ -535,7 +529,6 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                        $this->getTitleOrPageIdErrorMessage(),
                        array(
                                array( 'code' => 'bad_image_title', 'info' => "The title for {$this->getModuleName()} query must be an image" ),
-                               array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ),
                        )
                );
        }
@@ -562,8 +555,4 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
        public function getHelpUrls() {
                return $this->helpUrl;
        }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
 }