r85417 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85416‎ | r85417 | r85418 >
Date:04:07, 5 April 2011
Author:kaldari
Status:deferred (Comments)
Tags:
Comment:
better fix for 27424
Modified paths:
  • /trunk/extensions/UploadWizard/SpecialUploadWizard.php (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -519,9 +519,7 @@
520520 * Depending on whether we split uploading / detailing, it may actually always be as simple as loading a URL
521521 */
522522 reset: function() {
523 - // Get number of times we've reloaded UploadWizard (for Firefox 3 bug - 27424)
524 - var reloadNumber = parseInt(UploadWizardReload) + 1;
525 - window.location = wgArticlePath.replace( '$1', 'Special:UploadWizard?reload='+reloadNumber );
 523+ window.location = wgArticlePath.replace( '$1', 'Special:UploadWizard' );
526524 },
527525
528526
Index: trunk/extensions/UploadWizard/SpecialUploadWizard.php
@@ -37,7 +37,7 @@
3838 * @param $subPage, e.g. the "foo" in Special:UploadWizard/foo.
3939 */
4040 public function execute( $subPage ) {
41 - global $wgRequest, $wgLang, $wgUser, $wgOut, $wgExtensionAssetsPath,
 41+ global $wgLang, $wgUser, $wgOut, $wgExtensionAssetsPath,
4242 $wgUploadWizardDisableResourceLoader;
4343
4444 // side effects: if we can't upload, will print error page to wgOut
@@ -48,9 +48,6 @@
4949
5050 $this->setHeaders();
5151 $this->outputHeader();
52 -
53 - // Get number of times we've reloaded UploadWizard (for Firefox 3 bug - 27424)
54 - $reload = $wgRequest->getText( 'reload', '0' );
5552
5653 // fallback for non-JS
5754 $wgOut->addHTML( '<noscript>' );
@@ -60,7 +57,7 @@
6158
6259
6360 // global javascript variables
64 - $this->addJsVars( $subPage, $reload );
 61+ $this->addJsVars( $subPage );
6562
6663 // dependencies (css, js)
6764 if ( !$wgUploadWizardDisableResourceLoader && class_exists( 'ResourceLoader' ) ) {
@@ -92,7 +89,7 @@
9390 *
9491 * @param subpage, e.g. the "foo" in Special:UploadWizard/foo
9592 */
96 - public function addJsVars( $subPage, $reload ) {
 93+ public function addJsVars( $subPage ) {
9794 global $wgOut, $wgUpwizDir, $wgUploadWizardConfig, $wgSitename;
9895
9996 // Merge the default configuration with the local settings $wgUploadWizardConfig configuration
@@ -109,9 +106,6 @@
110107 // Site name is a true global not specific to Upload Wizard
111108 array(
112109 'wgSiteName' => $wgSitename
113 - ) +
114 - array(
115 - 'UploadWizardReload' => $reload
116110 )
117111 )
118112 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85415ugly fix for bug 27424kaldari02:54, 5 April 2011

Comments

#Comment by Kaldari (talk | contribs)   04:09, 5 April 2011

This is a less clunky fix for bug 27424. The other rev (r85415) was overkill.

Status & tagging log