X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCategory.php;h=d558dbc44dbc32268bda0e8d60889260ecdfc6d9;hb=fd24918228d5f5790be2e0f4db6cf3b55c679ced;hp=531e0be998be03f901476b84ee7c0935b4e734da;hpb=34038266ee8f3b88ebd50bebd87b2f85c0c9b60e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Category.php b/includes/Category.php index 531e0be998..d558dbc44d 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -60,7 +60,7 @@ class Category { return true; } - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $row = $dbr->selectRow( 'category', [ 'cat_id', 'cat_title', 'cat_pages', 'cat_subcats', 'cat_files' ], @@ -168,7 +168,7 @@ class Category { * @param Title $title Optional title object for the category represented by * the given row. May be provided if it is already known, to avoid having * to re-create a title object later. - * @return Category + * @return Category|false */ public static function newFromRow( $row, $title = null ) { $cat = new self(); @@ -264,7 +264,7 @@ class Category { */ public function getMembers( $limit = false, $offset = '' ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $conds = [ 'cl_to' => $this->getName(), 'cl_from = page_id' ]; $options = [ 'ORDER BY' => 'cl_sortkey' ];