X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiPageSet.php;h=cfac761c91edd98eb760facf0ab49f9b2c81aa88;hb=f8e202e0fbd62ac26cfa9ae2695ebc081b08226f;hp=a235532cf31ddab4565725208658f6e99d3932e6;hpb=bf9c2b0cb30cbe994f3a1859cf46224dd52039e1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index a235532cf3..cfac761c91 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -121,7 +121,7 @@ class ApiPageSet extends ApiBase { public function __construct( ApiBase $dbSource, $flags = 0, $defaultNamespace = NS_MAIN ) { parent::__construct( $dbSource->getMain(), $dbSource->getModuleName() ); $this->mDbSource = $dbSource; - $this->mAllowGenerator = ( $flags & ApiPageSet::DISABLE_GENERATORS ) == 0; + $this->mAllowGenerator = ( $flags & self::DISABLE_GENERATORS ) == 0; $this->mDefaultNamespace = $defaultNamespace; $this->mParams = $this->extractRequestParams(); @@ -166,7 +166,7 @@ class ApiPageSet extends ApiBase { } // Create a temporary pageset to store generator's output, // add any additional fields generator may need, and execute pageset to populate titles/pageids - $tmpPageSet = new ApiPageSet( $dbSource, ApiPageSet::DISABLE_GENERATORS ); + $tmpPageSet = new ApiPageSet( $dbSource, self::DISABLE_GENERATORS ); $generator->setGeneratorMode( $tmpPageSet ); $this->mCacheMode = $generator->getCacheMode( $generator->extractRequestParams() ); @@ -1356,7 +1356,7 @@ class ApiPageSet extends ApiBase { } } foreach ( $this->mGeneratorData as $ns => $dbkeys ) { - if ( $ns === -1 ) { + if ( $ns === NS_SPECIAL ) { $pages = []; foreach ( $this->mSpecialTitles as $id => $title ) { $pages[$title->getDBkey()] = $id; @@ -1426,7 +1426,7 @@ class ApiPageSet extends ApiBase { /** * Get the database connection (read-only) - * @return Database + * @return IDatabase */ protected function getDB() { return $this->mDbSource->getDB();