aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryLangLinks.php
diff options
context:
space:
mode:
authorYuri Astrakhan <yuriastrakhan@gmail.com>2013-01-14 21:19:16 -0500
committerYuri Astrakhan <yuriastrakhan@gmail.com>2013-01-14 21:19:16 -0500
commit983545c362921cd1a60b5f00d1d0088c51072cdc (patch)
tree09a95b03eafc8d5f636bc6995fe01fe4cb03f408 /includes/api/ApiQueryLangLinks.php
parent0198fc6c68c201bf28c6cca8bc7e5c5a61740e41 (diff)
downloadmediawikicore-983545c362921cd1a60b5f00d1d0088c51072cdc.tar.gz
mediawikicore-983545c362921cd1a60b5f00d1d0088c51072cdc.zip
API Cleanup: renamed '_badcontinue'->'badcontinue', one die()
* If a query module has 'continue' parameter, it will auto-report that it has 'badcontinue' error. * Added APIQueryBase::DieUsageContinueIf( $condition ) that shows correct badcontinue error if $condition is true. Change-Id: I9c48bda6de0cde3c117ad24460bddf6980279633
Diffstat (limited to 'includes/api/ApiQueryLangLinks.php')
-rw-r--r--includes/api/ApiQueryLangLinks.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/includes/api/ApiQueryLangLinks.php b/includes/api/ApiQueryLangLinks.php
index 3109a0908680..9c54cfa285ee 100644
--- a/includes/api/ApiQueryLangLinks.php
+++ b/includes/api/ApiQueryLangLinks.php
@@ -56,10 +56,7 @@ class ApiQueryLangLinks extends ApiQueryBase {
$this->addWhereFld( 'll_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' ? '<' : '>';
$llfrom = intval( $cont[0] );
$lllang = $this->getDB()->addQuotes( $cont[1] );
@@ -179,7 +176,6 @@ class ApiQueryLangLinks extends ApiQueryBase {
public function getPossibleErrors() {
return array_merge( parent::getPossibleErrors(), array(
array( 'missingparam', 'lang' ),
- array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ),
) );
}