Index: trunk/extensions/CentralNotice/special/SpecialCentralNotice.php |
— | — | @@ -1277,7 +1277,8 @@ |
1278 | 1278 | * Lookup the name of a campaign based on the campaign ID |
1279 | 1279 | */ |
1280 | 1280 | public static function getNoticeName( $noticeId ) { |
1281 | | - $dbr = wfGetDB( DB_SLAVE ); |
| 1281 | + // Read from the master database to avoid concurrency problems |
| 1282 | + $dbr = wfGetDB( DB_MASTER ); |
1282 | 1283 | if ( is_numeric( $noticeId ) ) { |
1283 | 1284 | $row = $dbr->selectRow( 'cn_notices', 'not_name', array( 'not_id' => $noticeId ) ); |
1284 | 1285 | if ( $row ) { |
Index: trunk/extensions/CentralNotice/CentralNotice.db.php |
— | — | @@ -131,7 +131,8 @@ |
132 | 132 | static function getCampaignSettings( $campaignName, $detailed = true ) { |
133 | 133 | global $wgCentralDBname; |
134 | 134 | |
135 | | - $dbr = wfGetDB( DB_SLAVE, array(), $wgCentralDBname ); |
| 135 | + // Read from the master database to avoid concurrency problems |
| 136 | + $dbr = wfGetDB( DB_MASTER, array(), $wgCentralDBname ); |
136 | 137 | |
137 | 138 | $campaign = array(); |
138 | 139 | |