r25439 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25438‎ | r25439 | r25440 >
Date:15:06, 3 September 2007
Author:raymond
Status:old
Tags:
Comment:
Fix a regression from the file repo stuff.
$file->getExtension returns now a normalized, lower case extension but the check needs the original extension from the upload input form.
Modified paths:
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -459,7 +459,7 @@
460460 // Check for uppercase extension. We allow these filenames but check if an image
461461 // with lowercase extension exists already
462462 $warning = '';
463 - $ext = $file->getExtension();
 463+ $ext = substr( $file->getName(), strlen( $file->getName() ) - strlen( $file->getExtension() ), strlen( $file->getExtension() ) );
464464 $sk = $wgUser->getSkin();
465465 if ( $ext !== '' ) {
466466 $partname = substr( $file->getName(), 0, -strlen( $ext ) - 1 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r25454Merged revisions 25415-25453 via svnmerge from...david19:27, 3 September 2007
r25481Fix the fix in r25439, which incorrectly assumed that normalized extensions a...brion15:56, 4 September 2007
r25530Merged revisions 25454-25529 via svnmerge from...david08:28, 5 September 2007

Status & tagging log