X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCategoryFinder.php;h=4efa2ff84ca2e014d72ee557e6f21506180532c2;hb=08f0a91371e5e1c13a7357635c1094f899473645;hp=3f0528ebe0b41669491d8190d6b315b14a36be23;hpb=8eac2feedb7ee093d2c48504e1eb2b8a9dbc8452;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CategoryFinder.php b/includes/CategoryFinder.php index 3f0528ebe0..4efa2ff84c 100644 --- a/includes/CategoryFinder.php +++ b/includes/CategoryFinder.php @@ -33,8 +33,8 @@ * * $cf = new CategoryFinder; * $cf->seed( - * array( 12345 ), - * array( 'Category 1', 'Category 2' ), + * [ 12345 ], + * [ 'Category 1', 'Category 2' ], * 'AND' * ); * $a = $cf->run(); @@ -49,7 +49,7 @@ class CategoryFinder { /** @var array Array of DBKEY category names for categories that don't have a page */ protected $deadend = []; - /** @var array Array of [ID => array()] */ + /** @var array Array of [ ID => [] ] */ protected $parents = []; /** @var array Array of article/category IDs */ @@ -64,7 +64,7 @@ class CategoryFinder { /** @var string "AND" or "OR" */ protected $mode; - /** @var IDatabase Read-DB slave */ + /** @var IDatabase Read-DB replica DB */ protected $dbr; /** @@ -96,7 +96,7 @@ class CategoryFinder { * @return array Array of page_ids (those given to seed() that match the conditions) */ public function run() { - $this->dbr = wfGetDB( DB_SLAVE ); + $this->dbr = wfGetDB( DB_REPLICA ); while ( count( $this->next ) > 0 ) { $this->scanNextLayer(); }