Index: trunk/phase3/includes/api/ApiQueryBlocks.php |
— | — | @@ -127,10 +127,9 @@ |
128 | 128 | Block::purgeExpired(); |
129 | 129 | |
130 | 130 | $res = $this->select(__METHOD__); |
131 | | - $db = wfGetDB(); |
132 | 131 | |
133 | 132 | $count = 0; |
134 | | - while($row = $db->fetchObject($res)) |
| 133 | + while($row = $res->fetchObject()) |
135 | 134 | { |
136 | 135 | if($count++ == $params['limit']) |
137 | 136 | { |
Index: trunk/extensions/SimpleSecurity/SimpleSecurity.php |
— | — | @@ -466,7 +466,7 @@ |
467 | 467 | # Request a DB connection to ensure the LoadBalancer is initialised, |
468 | 468 | # then change back to old DBtype since it won't be used for making connections again but can affect other operations |
469 | 469 | # such as $wgContLang->stripForSearch which is called by SearchMySQL::parseQuery |
470 | | - wfGetDB(); |
| 470 | + wfGetDB( DB_MASTER ); |
471 | 471 | $wgDBtype = $wgOldDBtype; |
472 | 472 | |
473 | 473 | # Add messages |
Index: trunk/extensions/Translate/tag/Utils.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | * Revision::getRevisionText( $row ). |
57 | 57 | */ |
58 | 58 | public static function getPageContent( $namespace, $pages ) { |
59 | | - $dbr = wfGetDB(); |
| 59 | + $dbr = wfGetDB( DB_SLAVE ); |
60 | 60 | $rows = $dbr->select( array( 'page', 'revision', 'text' ), |
61 | 61 | array( 'page_title', 'old_text', 'old_flags' ), |
62 | 62 | array( |
— | — | @@ -177,4 +177,4 @@ |
178 | 178 | return array_map( $function, $array ); |
179 | 179 | } |
180 | 180 | |
181 | | -} |
\ No newline at end of file |
| 181 | +} |
Index: trunk/extensions/Translate/tag/FuzzyJob.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | static $user; |
18 | 18 | |
19 | 19 | public static function fuzzyPages( $reason, $comment, Title $prefix ) { |
20 | | - $dbr = wfGetDB(); |
| 20 | + $dbr = wfGetDB( DB_SLAVE ); |
21 | 21 | $likePattern = $dbr->escapeLike( $prefix->getDBkey() ) . '/%%'; |
22 | 22 | |
23 | 23 | $res = $dbr->select( |
Index: trunk/extensions/DeleteQueue/ReviewForm.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | $queue = $dqi->getQueue( ); |
42 | 42 | |
43 | 43 | // Transaction |
44 | | - $dbw = wfGetDB(); |
| 44 | + $dbw = wfGetDB( DB_MASTER ); |
45 | 45 | $dbw->begin(); |
46 | 46 | |
47 | 47 | switch ($action) { |