Index: trunk/extensions/UploadWizard/resources/combined.js |
— | — | @@ -12834,7 +12834,10 @@ |
12835 | 12835 | } )( jQuery ); |
12836 | 12836 | /* |
12837 | 12837 | * 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. |
12839 | 12842 | */ |
12840 | 12843 | |
12841 | 12844 | // create UploadWizard |
— | — | @@ -12912,7 +12915,10 @@ |
12913 | 12916 | } |
12914 | 12917 | |
12915 | 12918 | 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. |
12917 | 12923 | mw.Language.magicSetup(); |
12918 | 12924 | |
12919 | 12925 | // show page. |
Index: trunk/extensions/UploadWizard/resources/combined.min.js |
— | — | @@ -12838,6 +12838,9 @@ |
12839 | 12839 | |
12840 | 12840 | |
12841 | 12841 | |
| 12842 | + |
| 12843 | + |
| 12844 | + |
12842 | 12845 | mw.UploadWizardPage=function(){ |
12843 | 12846 | |
12844 | 12847 | var apiUrl=false; |
— | — | @@ -12913,6 +12916,9 @@ |
12914 | 12917 | |
12915 | 12918 | jQuery(document).ready(function(){ |
12916 | 12919 | |
| 12920 | +mw.addTemplateTransform({'SITENAME':function(){return wgSitename;}}); |
| 12921 | + |
| 12922 | + |
12917 | 12923 | mw.Language.magicSetup(); |
12918 | 12924 | |
12919 | 12925 | |
Index: trunk/extensions/UploadWizard/SpecialUploadWizard.php |
— | — | @@ -85,10 +85,8 @@ |
86 | 86 | * @param subpage, e.g. the "foo" in Special:UploadWizard/foo |
87 | 87 | */ |
88 | 88 | 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; |
93 | 91 | |
94 | 92 | $wgOut->addScript( Skin::makeVariablesScript( array( |
95 | 93 | 'wgUploadWizardDebug' => (bool)$wgUploadWizardDebug, |
— | — | @@ -101,11 +99,13 @@ |
102 | 100 | // what is acceptable in this wiki |
103 | 101 | 'wgFileExtensions' => $wgFileExtensions, |
104 | 102 | |
105 | | - 'wgSubPage' => $subPage |
| 103 | + 'wgSubPage' => $subPage, |
106 | 104 | |
107 | 105 | // XXX need to have a better function for testing viability of a filename |
108 | 106 | // 'wgFilenamePrefixBlacklist' => UploadBase::getFilenamePrefixBlacklist() |
109 | 107 | |
| 108 | + 'wgSitename' => $wgSitename |
| 109 | + |
110 | 110 | ) ) ); |
111 | 111 | |
112 | 112 | } |
Index: trunk/extensions/UploadWizard/UploadWizardPage.js |
— | — | @@ -1,6 +1,9 @@ |
2 | 2 | /* |
3 | 3 | * 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. |
5 | 8 | */ |
6 | 9 | |
7 | 10 | // create UploadWizard |
— | — | @@ -78,7 +81,10 @@ |
79 | 82 | } |
80 | 83 | |
81 | 84 | 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. |
83 | 89 | mw.Language.magicSetup(); |
84 | 90 | |
85 | 91 | // show page. |