X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryContributors.php;h=912ac0213e1fdf14db82d038bb7e8ce9df977355;hb=16a9dd96bd5d7bec87c83d47fb954f2e7934dffe;hp=6b896e3290436b82fcadcbc284c80b8b5c8143d2;hpb=f0cf54b1869e666b7946ecc710e2c20db4ec076e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryContributors.php b/includes/api/ApiQueryContributors.php index 6b896e3290..55ea47025e 100644 --- a/includes/api/ApiQueryContributors.php +++ b/includes/api/ApiQueryContributors.php @@ -38,7 +38,7 @@ class ApiQueryContributors extends ApiQueryBase { */ const MAX_PAGES = 100; - public function __construct( $query, $moduleName ) { + public function __construct( ApiQuery $query, $moduleName ) { // "pc" is short for "page contributors", "co" was already taken by the // GeoData extension's prop=coordinates. parent::__construct( $query, $moduleName, 'pc' ); @@ -98,6 +98,7 @@ class ApiQueryContributors extends ApiQueryBase { $this->setContinueEnumParameter( 'continue', $params['continue'] !== null ? $params['continue'] : '0|0' ); + return; } } @@ -144,6 +145,7 @@ class ApiQueryContributors extends ApiQueryBase { // of anoncontributors $this->setContinueEnumParameter( 'continue', $continuePages ); } + return; } } elseif ( $params['excluderights'] ) { @@ -182,6 +184,7 @@ class ApiQueryContributors extends ApiQueryBase { // We've reached the one extra which shows that // there are additional pages to be had. Stop here... $this->setContinueEnumParameter( 'continue', $row->page . '|' . $row->user ); + return; } @@ -191,6 +194,7 @@ class ApiQueryContributors extends ApiQueryBase { ); if ( !$fit ) { $this->setContinueEnumParameter( 'continue', $row->page . '|' . $row->user ); + return; } } @@ -261,18 +265,9 @@ class ApiQueryContributors extends ApiQueryBase { ); } - public function getPossibleErrors() { - return array_merge( parent::getPossibleErrors(), - $this->getRequireMaxOneParameterErrorMessages( - array( 'group', 'excludegroup', 'rights', 'excluderights' ) - ) - ); - } - - public function getDescription() { return 'Get the list of logged-in contributors and ' . - 'the count of anonymous contributors to a page'; + 'the count of anonymous contributors to a page.'; } public function getExamples() {