r8011 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r8010‎ | r8011 | r8012 >
Date:12:23, 31 March 2005
Author:avar
Status:old
Tags:
Comment:
* Changed $wgUploadSizeWarning from 1.5 * 10^5 to 150 * 2^10
* The largefile message now displays $wgUploadSizeWarning
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -231,7 +231,9 @@
232232
233233 global $wgUploadSizeWarning;
234234 if ( $wgUploadSizeWarning && ( $this->mUploadSize > $wgUploadSizeWarning ) ) {
235 - $warning .= '<li>'.wfMsg( 'largefile' ).'</li>';
 235+ # TODO: Format $wgUploadSizeWarning to something that looks better than the raw byte
 236+ # value, perhaps add GB,MB and KB suffixes?
 237+ $warning .= '<li>'.wfMsg( 'largefile', $wgUploadSizeWarning ).'</li>';
236238 }
237239 if ( $this->mUploadSize == 0 ) {
238240 $warning .= '<li>'.wfMsg( 'emptyfile' ).'</li>';
Index: trunk/phase3/includes/DefaultSettings.php
@@ -777,7 +777,7 @@
778778 $wgStrictFileExtensions = true;
779779
780780 /** Warn if uploaded files are larger than this */
781 -$wgUploadSizeWarning = 150000;
 781+$wgUploadSizeWarning = 150 * 1024;
782782
783783 /** For compatibility with old installations set to false */
784784 $wgPasswordSalt = true;
Index: trunk/phase3/languages/Language.php
@@ -1011,7 +1011,7 @@
10121012 'illegalfilename' => 'The filename "$1" contains characters that are not allowed in page titles. Please rename the file and try uploading it again.',
10131013 'badfilename' => "Image name has been changed to \"$1\".",
10141014 'badfiletype' => "\".$1\" is not a recommended image file format.",
1015 -'largefile' => 'It is recommended that images not exceed 100k in size.',
 1015+'largefile' => 'It is recommended that images not exceed $1 bytes in size.',
10161016 'emptyfile' => 'The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file.',
10171017 'fileexists' => 'A file with this name exists already, please check $1 if you are not sure if you want to change it.',
10181018 'successfulupload' => 'Successful upload',

Status & tagging log