Index: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNotice.php |
— | — | @@ -1267,7 +1267,8 @@ |
1268 | 1268 | } |
1269 | 1269 | |
1270 | 1270 | static function getNoticeProjects( $noticeName ) { |
1271 | | - $dbr = wfGetDB( DB_SLAVE ); |
| 1271 | + // Read from the master database to avoid concurrency problems |
| 1272 | + $dbr = wfGetDB( DB_MASTER ); |
1272 | 1273 | $eNoticeName = htmlspecialchars( $noticeName ); |
1273 | 1274 | $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) ); |
1274 | 1275 | $projects = array(); |
— | — | @@ -1282,7 +1283,8 @@ |
1283 | 1284 | } |
1284 | 1285 | |
1285 | 1286 | static function getNoticeLanguages( $noticeName ) { |
1286 | | - $dbr = wfGetDB( DB_SLAVE ); |
| 1287 | + // Read from the master database to avoid concurrency problems |
| 1288 | + $dbr = wfGetDB( DB_MASTER ); |
1287 | 1289 | $eNoticeName = htmlspecialchars( $noticeName ); |
1288 | 1290 | $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) ); |
1289 | 1291 | $languages = array(); |
— | — | @@ -1297,7 +1299,8 @@ |
1298 | 1300 | } |
1299 | 1301 | |
1300 | 1302 | static function getNoticeCountries( $noticeName ) { |
1301 | | - $dbr = wfGetDB( DB_SLAVE ); |
| 1303 | + // Read from the master database to avoid concurrency problems |
| 1304 | + $dbr = wfGetDB( DB_MASTER ); |
1302 | 1305 | $eNoticeName = htmlspecialchars( $noticeName ); |
1303 | 1306 | $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) ); |
1304 | 1307 | $countries = array(); |
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNotice.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
1305 | 1308 | Merged /trunk/phase3/extensions/CentralNotice/special/SpecialCentralNotice.php:r63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573 |
1306 | 1309 | Merged /branches/wmf-deployment/extensions/CentralNotice/special/SpecialCentralNotice.php:r60970 |
1307 | 1310 | Merged /branches/wmf/1.16wmf4/extensions/CentralNotice/special/SpecialCentralNotice.php:r67177,69199,76243,77266 |
1308 | 1311 | Merged /trunk/extensions/CentralNotice/special/SpecialCentralNotice.php:r62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73830,73847,73850,73852,73855,73959,73963,73973,73980,73983,73991,73994-73995,74000-74321,74325-74406,75376-75470,75567,75643,75646,75674,75680,75726,75849,75889,75908,75973,76141,76145,76333,76347,76351,76356-76358,76361,76363,76462,76543,76763,77622-79761,79780,79783-80145,80147-80148,80150,80152-80602,81461-83563,83565-91117,91146,91368-92408,92767,93080 |