r77221 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77220‎ | r77221 | r77222 >
Date:08:17, 24 November 2010
Author:neilk
Status:deferred (Comments)
Tags:
Comment:
fix bug#26903, {{SITENAME}} in UploadWizard
Modified paths:
  • /trunk/extensions/UploadWizard/SpecialUploadWizard.php (modified) (history)
  • /trunk/extensions/UploadWizard/UploadWizardPage.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/combined.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/combined.min.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/combined.js
@@ -12834,7 +12834,10 @@
1283512835 } )( jQuery );
1283612836 /*
1283712837 * This script is run on [[Special:UploadWizard]].
12838 - * Creates an interface for uploading files in multiple steps, hence "wizard"
 12838+ * Configures and creates an interface for uploading files in multiple steps, hence "wizard".
 12839+ *
 12840+ * Tries to transform Javascript globals dumped on us by the SpecialUploadWizard.php into a more
 12841+ * compact configuration, owned by the UploadWizard created.
1283912842 */
1284012843
1284112844 // create UploadWizard
@@ -12912,7 +12915,10 @@
1291312916 }
1291412917
1291512918 jQuery( document ).ready( function() {
12916 - // sets up plural and so on. Seems like a bad design to have to do this, though.
 12919+ // add "magic" to Language template parser for keywords
 12920+ mw.addTemplateTransform( { 'SITENAME' : function() { return wgSitename; } } );
 12921+
 12922+ // sets up plural "magic" and so on. Seems like a bad design to have to do this, though.
1291712923 mw.Language.magicSetup();
1291812924
1291912925 // show page.
Index: trunk/extensions/UploadWizard/resources/combined.min.js
@@ -12838,6 +12838,9 @@
1283912839
1284012840
1284112841
 12842+
 12843+
 12844+
1284212845 mw.UploadWizardPage=function(){
1284312846
1284412847 var apiUrl=false;
@@ -12913,6 +12916,9 @@
1291412917
1291512918 jQuery(document).ready(function(){
1291612919
 12920+mw.addTemplateTransform({'SITENAME':function(){return wgSitename;}});
 12921+
 12922+
1291712923 mw.Language.magicSetup();
1291812924
1291912925
Index: trunk/extensions/UploadWizard/SpecialUploadWizard.php
@@ -85,10 +85,8 @@
8686 * @param subpage, e.g. the "foo" in Special:UploadWizard/foo
8787 */
8888 public function addJsVars( $subPage ) {
89 - global $wgUser, $wgOut;
90 - global $wgUseAjax, $wgAjaxLicensePreview, $wgEnableAPI;
91 - global $wgEnableFirefogg, $wgFileExtensions;
92 - global $wgUploadWizardDebug;
 89+ global $wgUser, $wgOut, $wgUseAjax, $wgAjaxLicensePreview, $wgEnableAPI,
 90+ $wgEnableFirefogg, $wgFileExtensions,$wgUploadWizardDebug, $wgSitename;
9391
9492 $wgOut->addScript( Skin::makeVariablesScript( array(
9593 'wgUploadWizardDebug' => (bool)$wgUploadWizardDebug,
@@ -101,11 +99,13 @@
102100 // what is acceptable in this wiki
103101 'wgFileExtensions' => $wgFileExtensions,
104102
105 - 'wgSubPage' => $subPage
 103+ 'wgSubPage' => $subPage,
106104
107105 // XXX need to have a better function for testing viability of a filename
108106 // 'wgFilenamePrefixBlacklist' => UploadBase::getFilenamePrefixBlacklist()
109107
 108+ 'wgSitename' => $wgSitename
 109+
110110 ) ) );
111111
112112 }
Index: trunk/extensions/UploadWizard/UploadWizardPage.js
@@ -1,6 +1,9 @@
22 /*
33 * This script is run on [[Special:UploadWizard]].
4 - * Creates an interface for uploading files in multiple steps, hence "wizard"
 4+ * Configures and creates an interface for uploading files in multiple steps, hence "wizard".
 5+ *
 6+ * Tries to transform Javascript globals dumped on us by the SpecialUploadWizard.php into a more
 7+ * compact configuration, owned by the UploadWizard created.
58 */
69
710 // create UploadWizard
@@ -78,7 +81,10 @@
7982 }
8083
8184 jQuery( document ).ready( function() {
82 - // sets up plural and so on. Seems like a bad design to have to do this, though.
 85+ // add "magic" to Language template parser for keywords
 86+ mw.addTemplateTransform( { 'SITENAME' : function() { return wgSitename; } } );
 87+
 88+ // sets up plural "magic" and so on. Seems like a bad design to have to do this, though.
8389 mw.Language.magicSetup();
8490
8591 // show page.

Comments

#Comment by Reedy (talk | contribs)   11:25, 24 November 2010

Seems bug#1111 doesn't work without the space

bug 26903

#Comment by Guillom (talk | contribs)   22:27, 29 November 2010

It was actually bug 26103

#Comment by Catrope (talk | contribs)   14:12, 30 November 2010

I think he meant bug 26093 ; interestingly, one is a dupe of the other :)

Status & tagging log