X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FCategoryFinder.php;h=4efa2ff84ca2e014d72ee557e6f21506180532c2;hb=154b4383fe33aef9171dafa4350684cca36439a8;hp=3f0528ebe0b41669491d8190d6b315b14a36be23;hpb=3071f1fad720f1773864621158a0c59b73124896;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(); }