X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryProtectedTitles.php;h=ea350adde375cac6e30f99d216a52fce6c65dc7a;hb=94ba63be03795a37598e93617ff8130daedcc472;hp=222ad0741aa7e285d71389567f18a315fcfbeb6e;hpb=f10c9815e69b59844c178d218640bd1ac0435896;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryProtectedTitles.php b/includes/api/ApiQueryProtectedTitles.php index 222ad0741a..ea350adde3 100644 --- a/includes/api/ApiQueryProtectedTitles.php +++ b/includes/api/ApiQueryProtectedTitles.php @@ -80,8 +80,9 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase { $titles = array(); foreach ( $res as $row ) { - if ( ++ $count > $params['limit'] ) { - // We've reached the one extra which shows that there are additional pages to be had. Stop here... + if ( ++$count > $params['limit'] ) { + // We've reached the one extra which shows that there are + // additional pages to be had. Stop here... $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->pt_timestamp ) ); break; } @@ -131,7 +132,10 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase { } if ( is_null( $resultPageSet ) ) { - $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), $this->getModulePrefix() ); + $result->setIndexedTagName_internal( + array( 'query', $this->getModuleName() ), + $this->getModulePrefix() + ); } else { $resultPageSet->populateFromTitles( $titles ); } @@ -148,6 +152,7 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase { public function getAllowedParams() { global $wgRestrictionLevels; + return array( 'namespace' => array( ApiBase::PARAM_ISMULTI => true, @@ -216,6 +221,7 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase { public function getResultProperties() { global $wgRestrictionLevels; + return array( '' => array( 'ns' => 'namespace',