From: Rob Church Date: Sat, 11 Aug 2007 16:05:17 +0000 (+0000) Subject: Should be using master here, otherwise we risk inconsistent data X-Git-Tag: 1.31.0-rc.0~51795 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=384def49d3fba970833b6d9c2bd58be9c15f749d;p=lhc%2Fweb%2Fwiklou.git Should be using master here, otherwise we risk inconsistent data --- diff --git a/includes/WatchlistEditor.php b/includes/WatchlistEditor.php index 3bdca72e63..cdc9f0ee33 100644 --- a/includes/WatchlistEditor.php +++ b/includes/WatchlistEditor.php @@ -164,7 +164,7 @@ class WatchlistEditor { * @return int */ private function countWatchlist( $user ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_MASTER ); $res = $dbr->select( 'watchlist', 'COUNT(*) AS count', array( 'wl_user' => $user->getId() ), __METHOD__ ); $row = $dbr->fetchObject( $res ); return ceil( $row->count / 2 ); // Paranoia @@ -179,7 +179,7 @@ class WatchlistEditor { */ private function getWatchlist( $user ) { $list = array(); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_MASTER ); $res = $dbr->select( 'watchlist', '*', @@ -209,7 +209,7 @@ class WatchlistEditor { */ private function getWatchlistInfo( $user ) { $titles = array(); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_MASTER ); $uid = intval( $user->getId() ); list( $watchlist, $page ) = $dbr->tableNamesN( 'watchlist', 'page' ); $sql = "SELECT wl_namespace, wl_title, page_id, page_is_redirect