X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRandomInCategory.php;h=adf12d40a650853d67cb3d26bf976e39b3d8aedf;hb=1c0d9ba2e8e35c361ca94cdc75e4015542dda3a6;hp=a5e538f1611225abec38ce9492cec2210852611a;hpb=b86ef89dd17f51841a220e8ef9b3b8b2402e2547;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index a5e538f161..adf12d40a6 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -223,7 +223,7 @@ class SpecialRandomInCategory extends FormSpecialPage { ] ]; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $minClTime = $this->getTimestampOffset( $rand ); if ( $minClTime ) { $qi['conds'][] = 'cl_timestamp ' . $op . ' ' . @@ -264,7 +264,7 @@ class SpecialRandomInCategory extends FormSpecialPage { * @throws MWException If category has no entries. */ protected function getMinAndMaxForCat( Title $category ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->selectRow( 'categorylinks', [ @@ -272,7 +272,7 @@ class SpecialRandomInCategory extends FormSpecialPage { 'high' => 'MAX( cl_timestamp )' ], [ - 'cl_to' => $this->category->getDBKey(), + 'cl_to' => $this->category->getDBkey(), ], __METHOD__, [ @@ -294,7 +294,7 @@ class SpecialRandomInCategory extends FormSpecialPage { * @return array Info for the title selected. */ private function selectRandomPageFromDB( $rand, $offset, $up, $fname = __METHOD__ ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $query = $this->getQueryInfo( $rand, $offset, $up ); $res = $dbr->select(