Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadCampaign.php |
— | — | @@ -152,7 +152,7 @@ |
153 | 153 | } |
154 | 154 | |
155 | 155 | public function onSuccess() { |
156 | | - $this->getOutput()->redirect( SpecialPage::getTitleFor( 'UploadCampaigns' )->getLocalURL() ); |
| 156 | + $this->getOutput()->redirect( SpecialPage::getTitleFor( 'UploadCampaigns' )->getLocalURL( array( 'refresh' => '1' ) ) ); |
157 | 157 | } |
158 | 158 | |
159 | 159 | } |
Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadCampaigns.php |
— | — | @@ -81,9 +81,12 @@ |
82 | 82 | protected function displayUploadCamaigns() { |
83 | 83 | $this->displayAddNewControl(); |
84 | 84 | |
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 ); |
86 | 89 | |
87 | | - $campaigns = $dbr->select( |
| 90 | + $campaigns = $db->select( |
88 | 91 | 'uw_campaigns', |
89 | 92 | array( |
90 | 93 | 'campaign_id', |