Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -338,6 +338,15 @@ |
339 | 339 | |
340 | 340 | list( $existsType, $file ) = $exists; |
341 | 341 | |
| 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 | + |
342 | 351 | $sk = $wgUser->getSkin(); |
343 | 352 | |
344 | 353 | if( $existsType == 'exists' ) { |