r103518 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103517‎ | r103518 | r103519 >
Date:22:46, 17 November 2011
Author:jeroendedauw
Status:ok (Comments)
Tags:neilk 
Comment:
attempt to fix bug 32462
Modified paths:
  • /trunk/extensions/UploadWizard/includes/specials/SpecialUploadCampaign.php (modified) (history)
  • /trunk/extensions/UploadWizard/includes/specials/SpecialUploadCampaigns.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadCampaign.php
@@ -152,7 +152,7 @@
153153 }
154154
155155 public function onSuccess() {
156 - $this->getOutput()->redirect( SpecialPage::getTitleFor( 'UploadCampaigns' )->getLocalURL() );
 156+ $this->getOutput()->redirect( SpecialPage::getTitleFor( 'UploadCampaigns' )->getLocalURL( array( 'refresh' => '1' ) ) );
157157 }
158158
159159 }
Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadCampaigns.php
@@ -81,9 +81,12 @@
8282 protected function displayUploadCamaigns() {
8383 $this->displayAddNewControl();
8484
85 - $dbr = wfGetDB( DB_SLAVE );
 85+ // If the refresh flag is set, fetch from the master.
 86+ // This is to ensure changes show up right away for the person that makes then
 87+ // instead of getting hidden due to replag on installs with multiple db servers.
 88+ $db = wfGetDB( $this->getRequest()->getCheck( 'refresh' ) ? DB_MASTER : DB_SLAVE );
8689
87 - $campaigns = $dbr->select(
 90+ $campaigns = $db->select(
8891 'uw_campaigns',
8992 array(
9093 'campaign_id',

Comments

#Comment by NeilK (talk | contribs)   18:38, 6 December 2011

Doesn't seem like it would hurt anything.

Status & tagging log