Index: branches/wmf/1.17wmf1/extensions/UploadWizard/SpecialUploadWizard.php |
— | — | @@ -180,7 +180,30 @@ |
181 | 181 | */ |
182 | 182 | function getWizardHtml() { |
183 | 183 | global $wgUploadWizardConfig, $wgExtensionAssetsPath; |
184 | | - |
| 184 | + |
| 185 | + if ( array_key_exists( 'fallbackToAltUploadForm', $wgUploadWizardConfig ) |
| 186 | + && array_key_exists( 'altUploadForm', $wgUploadWizardConfig ) |
| 187 | + && $wgUploadWizardConfig['altUploadForm'] != '' |
| 188 | + && $wgUploadWizardConfig[ 'fallbackToAltUploadForm' ] ) { |
| 189 | + |
| 190 | + $linkHtml = ''; |
| 191 | + $altUploadForm = Title::newFromText( $wgUploadWizardConfig[ 'altUploadForm' ] ); |
| 192 | + if ( $altUploadForm instanceof Title ) { |
| 193 | + $linkHtml = Html::rawElement( 'p', array( 'style' => 'text-align: center;' ), |
| 194 | + Html::rawElement( 'a', array( 'href' => $altUploadForm->getLocalURL() ), |
| 195 | + $wgUploadWizardConfig['altUploadForm'] |
| 196 | + ) |
| 197 | + ); |
| 198 | + } |
| 199 | + |
| 200 | + return |
| 201 | + Html::rawElement( 'div', array( 'id' => 'upload-wizard', 'class' => 'upload-section' ), |
| 202 | + Html::rawElement( 'p', array( 'style' => 'text-align: center' ), wfMsg( 'mwe-upwiz-extension-disabled' ) ) |
| 203 | + . $linkHtml |
| 204 | + ); |
| 205 | + |
| 206 | + } |
| 207 | + |
185 | 208 | $tutorialHtml = ''; |
186 | 209 | // only load the tutorial HTML if we aren't skipping the first step |
187 | 210 | // TODO should use user preference not a cookie ( so the user does not have to skip it for every browser ) |
Index: branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.i18n.php |
— | — | @@ -15,6 +15,7 @@ |
16 | 16 | 'uploadwizard' => 'Upload wizard', |
17 | 17 | 'uploadwizard-desc' => 'Upload wizard, developed for the Multimedia Usability grant', |
18 | 18 | 'mwe-upwiz-js-off' => 'UploadWizard uses JavaScript for an improved interface. Your browser either does not support JavaScript or has JavaScript turned off, so we are showing you a simple upload form.', |
| 19 | + 'mwe-upwiz-extension-disabled' => 'This page has been disabled due to temporary technical problems. In the meantime try the standard upload form.', |
19 | 20 | 'mwe-upwiz-code-unknown' => 'Unknown language', |
20 | 21 | 'mwe-upwiz-step-tutorial' => 'Learn', |
21 | 22 | 'mwe-upwiz-step-file' => 'Upload', |
Property changes on: branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.LanguageUpWiz.js |
___________________________________________________________________ |
Modified: svn:mergeinfo |
22 | 23 | Merged /trunk/extensions/UploadWizard/resources/mw.LanguageUpWiz.js:r87863-87864 |
Property changes on: branches/wmf/1.17wmf1/extensions/UploadWizard |
___________________________________________________________________ |
Modified: svn:mergeinfo |
23 | 24 | Merged /trunk/extensions/UploadWizard:r87863-87864 |