Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php |
— | — | @@ -585,7 +585,7 @@ |
586 | 586 | |
587 | 587 | // Handle updating geotargeting |
588 | 588 | if ( $wgRequest->getCheck( 'geotargeted' ) ) { |
589 | | - $this->updateGeotargeted( $notice, '1' ); |
| 589 | + $this->updateGeotargeted( $notice, 1 ); |
590 | 590 | $countries = $wgRequest->getArray( 'geo_countries' ); |
591 | 591 | if ( $countries ) { |
592 | 592 | $this->updateCountries( $notice, $countries ); |
— | — | @@ -1512,10 +1512,8 @@ |
1513 | 1513 | |
1514 | 1514 | function updateCountries( $notice, $newCountries ) { |
1515 | 1515 | $dbw = wfGetDB( DB_MASTER ); |
1516 | | - $dbw->begin(); |
1517 | 1516 | |
1518 | 1517 | // Get the previously assigned languages |
1519 | | - $oldCountries = array(); |
1520 | 1518 | $oldCountries = $this->getNoticeCountries( $notice ); |
1521 | 1519 | |
1522 | 1520 | // Get the notice id |
— | — | @@ -1536,8 +1534,6 @@ |
1537 | 1535 | array( 'nc_notice_id' => $row->not_id, 'nc_country' => $removeCountries ) |
1538 | 1536 | ); |
1539 | 1537 | } |
1540 | | - |
1541 | | - $dbw->commit(); |
1542 | 1538 | } |
1543 | 1539 | |
1544 | 1540 | public static function noticeExists( $noticeName ) { |