Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2128,8 +2128,9 @@ |
2129 | 2129 | * master (for write queries), DB_SLAVE for potentially lagged |
2130 | 2130 | * read queries, or an integer >= 0 for a particular server. |
2131 | 2131 | * |
2132 | | - * @param array $groups Query groups. A list of group names that this query |
2133 | | - * belongs to. |
| 2132 | + * @param mixed $groups Query groups. An array of group names that this query |
| 2133 | + * belongs to. May contain a single string if the query is only |
| 2134 | + * in one group. |
2134 | 2135 | */ |
2135 | 2136 | function &wfGetDB( $db = DB_LAST, $groups = array() ) { |
2136 | 2137 | global $wgLoadBalancer; |
Index: trunk/phase3/includes/SpecialWatchlist.php |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | $wgOut->addHTML( "</p>\n<p>" . wfMsg( 'wldone' ) . "</p>\n" ); |
106 | 106 | } |
107 | 107 | |
108 | | - $dbr =& wfGetDB( DB_SLAVE ); |
| 108 | + $dbr =& wfGetDB( DB_SLAVE, 'watchlist' ); |
109 | 109 | list( $page, $watchlist, $recentchanges ) = $dbr->tableNamesN( 'page', 'watchlist', 'recentchanges' ); |
110 | 110 | |
111 | 111 | $sql = "SELECT COUNT(*) AS n FROM $watchlist WHERE wl_user=$uid"; |
— | — | @@ -435,7 +435,7 @@ |
436 | 436 | * @return integer |
437 | 437 | */ |
438 | 438 | function wlCountItems( &$user, $talk = true ) { |
439 | | - $dbr =& wfGetDB( DB_SLAVE ); |
| 439 | + $dbr =& wfGetDB( DB_SLAVE, 'watchlist' ); |
440 | 440 | |
441 | 441 | # Fetch the raw count |
442 | 442 | $res = $dbr->select( 'watchlist', 'COUNT(*) AS count', array( 'wl_user' => $user->mId ), 'wlCountItems' ); |