Merge "Group E-mail settings stuff in Setup.php"
[lhc/web/wiklou.git] / includes / api / ApiQueryContributors.php
index 6b896e3..55ea470 100644 (file)
@@ -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() {