Gilles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201434

Change subject: Only display upload size limit differentiation message if there 
are 2 upload methods
......................................................................

Only display upload size limit differentiation message if there are 2 upload 
methods

Bug: T94727
Change-Id: I23c5a5c5e7a30484c242005db831eec5c8c1f4a7
---
M includes/specials/SpecialUpload.php
1 file changed, 12 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/201434/1

diff --git a/includes/specials/SpecialUpload.php 
b/includes/specials/SpecialUpload.php
index 72d02e0..6f9254b 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -885,6 +885,17 @@
                        );
                }
 
+               $help = $this->msg( 'upload-maxfilesize',
+                               $this->getContext()->getLanguage()->formatSize( 
$this->mMaxUploadSize['file'] )
+                       )->parse();
+
+               // If the user can also upload by URL, there are 2 different 
file size limits.
+               // This extra message helps stress which limit corresponds to 
what.
+               if ( $canUploadByUrl ) {
+                       $help .= $this->msg( 'word-separator' )->escaped();
+                       $help .= $this->msg( 'upload_source_file' )->parse();
+               }
+
                $descriptor['UploadFile'] = array(
                        'class' => 'UploadSourceField',
                        'section' => 'source',
@@ -894,11 +905,7 @@
                        'label-message' => 'sourcefilename',
                        'upload-type' => 'File',
                        'radio' => &$radio,
-                       'help' => $this->msg( 'upload-maxfilesize',
-                               $this->getContext()->getLanguage()->formatSize( 
$this->mMaxUploadSize['file'] )
-                       )->parse() .
-                               $this->msg( 'word-separator' )->escaped() .
-                               $this->msg( 'upload_source_file' )->escaped(),
+                       'help' => $help,
                        'checked' => $selectedSourceType == 'file',
                );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/201434
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23c5a5c5e7a30484c242005db831eec5c8c1f4a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gilles <gdu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to