r73099 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73098‎ | r73099 | r73100 >
Date:22:55, 15 September 2010
Author:kaldari
Status:ok
Tags:
Comment:
changes per comments at r72952
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -585,7 +585,7 @@
586586
587587 // Handle updating geotargeting
588588 if ( $wgRequest->getCheck( 'geotargeted' ) ) {
589 - $this->updateGeotargeted( $notice, '1' );
 589+ $this->updateGeotargeted( $notice, 1 );
590590 $countries = $wgRequest->getArray( 'geo_countries' );
591591 if ( $countries ) {
592592 $this->updateCountries( $notice, $countries );
@@ -1512,10 +1512,8 @@
15131513
15141514 function updateCountries( $notice, $newCountries ) {
15151515 $dbw = wfGetDB( DB_MASTER );
1516 - $dbw->begin();
15171516
15181517 // Get the previously assigned languages
1519 - $oldCountries = array();
15201518 $oldCountries = $this->getNoticeCountries( $notice );
15211519
15221520 // Get the notice id
@@ -1536,8 +1534,6 @@
15371535 array( 'nc_notice_id' => $row->not_id, 'nc_country' => $removeCountries )
15381536 );
15391537 }
1540 -
1541 - $dbw->commit();
15421538 }
15431539
15441540 public static function noticeExists( $noticeName ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72952adding some functions for geotargeting, support for updating geokaldari01:44, 14 September 2010

Status & tagging log