*/
class ApiQueryProtectedTitles extends ApiQueryGeneratorBase {
- public function __construct( $query, $moduleName ) {
+ public function __construct( ApiQuery $query, $moduleName ) {
parent::__construct( $query, $moduleName, 'pt' );
}
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
}
public function getAllowedParams() {
- global $wgRestrictionLevels;
-
return array(
'namespace' => array(
ApiBase::PARAM_ISMULTI => true,
),
'level' => array(
ApiBase::PARAM_ISMULTI => true,
- ApiBase::PARAM_TYPE => array_diff( $wgRestrictionLevels, array( '' ) )
+ ApiBase::PARAM_TYPE => array_diff( $this->getConfig()->get( 'RestrictionLevels' ), array( '' ) )
),
'limit' => array(
ApiBase::PARAM_DFLT => 10,
}
public function getResultProperties() {
- global $wgRestrictionLevels;
-
return array(
'' => array(
'ns' => 'namespace',
),
'level' => array(
'level' => array(
- ApiBase::PROP_TYPE => array_diff( $wgRestrictionLevels, array( '' ) )
+ ApiBase::PROP_TYPE => array_diff( $this->getConfig()->get( 'RestrictionLevels' ), array( '' ) )
)
)
);