dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Use getConnectionRef() in ForeignDBViaLBRepo"
[lhc/web/wiklou.git]
/
includes
/
CategoryFinder.php
diff --git
a/includes/CategoryFinder.php
b/includes/CategoryFinder.php
index
3f0528e
..
4efa2ff
100644
(file)
--- a/
includes/CategoryFinder.php
+++ b/
includes/CategoryFinder.php
@@
-33,8
+33,8
@@
*
* $cf = new CategoryFinder;
* $cf->seed(
*
* $cf = new CategoryFinder;
* $cf->seed(
- *
array( 12345 )
,
- *
array( 'Category 1', 'Category 2' )
,
+ *
[ 12345 ]
,
+ *
[ 'Category 1', 'Category 2' ]
,
* 'AND'
* );
* $a = $cf->run();
* '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 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 */
protected $parents = [];
/** @var array Array of article/category IDs */
@@
-64,7
+64,7
@@
class CategoryFinder {
/** @var string "AND" or "OR" */
protected $mode;
/** @var string "AND" or "OR" */
protected $mode;
- /** @var IDatabase Read-DB
slave
*/
+ /** @var IDatabase Read-DB
replica DB
*/
protected $dbr;
/**
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() {
* @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();
}
while ( count( $this->next ) > 0 ) {
$this->scanNextLayer();
}