aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryLangBacklinks.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/ApiQueryLangBacklinks.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/ApiQueryLangBacklinks.php')
-rw-r--r--includes/api/ApiQueryLangBacklinks.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/includes/api/ApiQueryLangBacklinks.php b/includes/api/ApiQueryLangBacklinks.php
index 3920407b9186..d6346d3ff493 100644
--- a/includes/api/ApiQueryLangBacklinks.php
+++ b/includes/api/ApiQueryLangBacklinks.php
@@ -56,10 +56,7 @@ class ApiQueryLangBacklinks 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' ? '<' : '>';
@@ -233,7 +230,6 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase {
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' ),
) );
}