Index: trunk/extensions/UploadWizard/SpecialUploadWizard.php |
— | — | @@ -180,7 +180,27 @@ |
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 ( get_class( $altUploadForm ) == 'Title' ) { |
| 193 | + $linkHtml = '<p style="text-align: center;"><a href="' . $altUploadForm->getLocalURL() . '">' |
| 194 | + . $wgUploadWizardConfig['altUploadForm'] |
| 195 | + .'</a></p>'; |
| 196 | + } |
| 197 | + |
| 198 | + return |
| 199 | + '<div id="upload-wizard" class="upload-section">' |
| 200 | + . '<p style="text-align: center;">' . wfMsg( 'mwe-upwiz-extension-disabled' ) . '</p>' |
| 201 | + . $linkHtml |
| 202 | + . '</div>'; |
| 203 | + } |
| 204 | + |
185 | 205 | $tutorialHtml = ''; |
186 | 206 | // only load the tutorial HTML if we aren't skipping the first step |
187 | 207 | // TODO should use user preference not a cookie ( so the user does not have to skip it for every browser ) |
Index: trunk/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', |