r24732 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24731‎ | r24732 | r24733 >
Date:16:05, 11 August 2007
Author:robchurch
Status:old
Tags:
Comment:
Should be using master here, otherwise we risk inconsistent data
Modified paths:
  • /trunk/phase3/includes/WatchlistEditor.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WatchlistEditor.php
@@ -164,7 +164,7 @@
165165 * @return int
166166 */
167167 private function countWatchlist( $user ) {
168 - $dbr = wfGetDB( DB_SLAVE );
 168+ $dbr = wfGetDB( DB_MASTER );
169169 $res = $dbr->select( 'watchlist', 'COUNT(*) AS count', array( 'wl_user' => $user->getId() ), __METHOD__ );
170170 $row = $dbr->fetchObject( $res );
171171 return ceil( $row->count / 2 ); // Paranoia
@@ -179,7 +179,7 @@
180180 */
181181 private function getWatchlist( $user ) {
182182 $list = array();
183 - $dbr = wfGetDB( DB_SLAVE );
 183+ $dbr = wfGetDB( DB_MASTER );
184184 $res = $dbr->select(
185185 'watchlist',
186186 '*',
@@ -209,7 +209,7 @@
210210 */
211211 private function getWatchlistInfo( $user ) {
212212 $titles = array();
213 - $dbr = wfGetDB( DB_SLAVE );
 213+ $dbr = wfGetDB( DB_MASTER );
214214 $uid = intval( $user->getId() );
215215 list( $watchlist, $page ) = $dbr->tableNamesN( 'watchlist', 'page' );
216216 $sql = "SELECT wl_namespace, wl_title, page_id, page_is_redirect

Follow-up revisions

RevisionCommit summaryAuthorDate
r24755Merged revisions 24694-24754 via svnmerge from...david19:48, 13 August 2007

Status & tagging log