X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2FCategoryFinder.php;h=595cf9510447cd042fd183bd69efef735bee84cb;hb=9f53096051639c08cba43f9b72650ef5adee1df0;hp=3d5e6c58ab8acacd25303b88277bc2b6675938b0;hpb=f82b0e76306a9feca014e563a5fac0688cf876dc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CategoryFinder.php b/includes/CategoryFinder.php index 3d5e6c58ab..595cf95104 100644 --- a/includes/CategoryFinder.php +++ b/includes/CategoryFinder.php @@ -20,6 +20,8 @@ * @file */ +use Wikimedia\Rdbms\IDatabase; + /** * The "CategoryFinder" class takes a list of articles, creates an internal * representation of all their parent categories (as well as parents of @@ -40,7 +42,6 @@ * $a = $cf->run(); * print implode( ',' , $a ); * @endcode - * */ class CategoryFinder { /** @var int[] The original article IDs passed to the seed function */ @@ -64,7 +65,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 +97,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(); }