r55464 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55463‎ | r55464 | r55465 >
Date:05:24, 22 August 2009
Author:dale
Status:ok (Comments)
Tags:
Comment:
re-added $partname for warning checks 53361#c3664
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -338,6 +338,15 @@
339339
340340 list( $existsType, $file ) = $exists;
341341
 342+ if( strpos( $file->getName(), '.' ) == false ) {
 343+ $partname = $file->getName();
 344+ $rawExtension = '';
 345+ } else {
 346+ $n = strrpos( $file->getName(), '.' );
 347+ $rawExtension = substr( $file->getName(), $n + 1 );
 348+ $partname = substr( $file->getName(), 0, $n );
 349+ }
 350+
342351 $sk = $wgUser->getSkin();
343352
344353 if( $existsType == 'exists' ) {

Comments

#Comment by Simetrical (talk | contribs)   03:46, 23 August 2009

Trivial fixme: you're using spaces here instead of tabs. (I'd fix it, but it's late and I want to go to bed.)

#Comment by Simetrical (talk | contribs)   03:51, 23 August 2009

Never mind, was fixed in r55497 already.

Status & tagging log