X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryIWBacklinks.php;h=b47d31f2668d8dab45373e172500f1529d41d78d;hb=2772d8c1a6250507e699930fc8e030e58d345e23;hp=37f347d733854feb95034ad407d82b93e249e4c9;hpb=7e0f86a32f42c551d050d514c162ec6a180e2a2c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryIWBacklinks.php b/includes/api/ApiQueryIWBacklinks.php index 37f347d733..b47d31f266 100644 --- a/includes/api/ApiQueryIWBacklinks.php +++ b/includes/api/ApiQueryIWBacklinks.php @@ -5,7 +5,7 @@ * Created on May 14, 2010 * * Copyright © 2010 Sam Reed - * Copyright © 2006 Yuri Astrakhan @gmail.com + * Copyright © 2006 Yuri Astrakhan "@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 @@ -56,15 +56,12 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase { if ( !is_null( $params['continue'] ) ) { $cont = explode( '|', $params['continue'] ); - if ( count( $cont ) != 3 ) { - $this->dieUsage( 'Invalid continue param. You should pass the ' . - 'original value returned by the previous query', '_badcontinue' ); - } + $this->dieContinueUsageIf( count( $cont ) != 3 ); $db = $this->getDB(); $op = $params['dir'] == 'descending' ? '<' : '>'; $prefix = $db->addQuotes( $cont[0] ); - $title = $db->addQuotes( $this->titleToKey( $cont[1] ) ); + $title = $db->addQuotes( $cont[1] ); $from = intval( $cont[2] ); $this->addWhere( "iwl_prefix $op $prefix OR " . @@ -233,7 +230,6 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase { public function getPossibleErrors() { return array_merge( parent::getPossibleErrors(), array( array( 'missingparam', 'prefix' ), - array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ), ) ); } @@ -243,8 +239,4 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase { 'api.php?action=query&generator=iwbacklinks&giwbltitle=Test&giwblprefix=wikibooks&prop=info' ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } }