r87865 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87864‎ | r87865 | r87866 >
Date:01:09, 11 May 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/UploadWizard (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/UploadWizard/SpecialUploadWizard.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.i18n.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.LanguageUpWiz.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/UploadWizard/SpecialUploadWizard.php
@@ -180,7 +180,30 @@
181181 */
182182 function getWizardHtml() {
183183 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+
185208 $tutorialHtml = '';
186209 // only load the tutorial HTML if we aren't skipping the first step
187210 // 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 @@
1616 'uploadwizard' => 'Upload wizard',
1717 'uploadwizard-desc' => 'Upload wizard, developed for the Multimedia Usability grant',
1818 '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.',
1920 'mwe-upwiz-code-unknown' => 'Unknown language',
2021 'mwe-upwiz-step-tutorial' => 'Learn',
2122 'mwe-upwiz-step-file' => 'Upload',
Property changes on: branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.LanguageUpWiz.js
___________________________________________________________________
Modified: svn:mergeinfo
2223 Merged /trunk/extensions/UploadWizard/resources/mw.LanguageUpWiz.js:r87863-87864
Property changes on: branches/wmf/1.17wmf1/extensions/UploadWizard
___________________________________________________________________
Modified: svn:mergeinfo
2324 Merged /trunk/extensions/UploadWizard:r87863-87864

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87863fallback to alternate upload form when configured to do soneilk00:39, 11 May 2011
r87864followup to r87863; use Html::rawElement() for HTML, and instanceof instead o...neilk01:03, 11 May 2011

Comments

#Comment by 😂 (talk | contribs)   01:09, 11 May 2011

Harmless prop change on the .js file, didn't mean to commit that.

Status & tagging log