From: Michael Dale Date: Sat, 22 Aug 2009 05:24:21 +0000 (+0000) Subject: re-added $partname for warning checks 53361#c3664 X-Git-Tag: 1.31.0-rc.0~40133 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=3c2318e04f138121178250f025d672a73b1cca22;p=lhc%2Fweb%2Fwiklou.git re-added $partname for warning checks 53361#c3664 --- diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 7c51fa1b59..2bcf74489d 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -338,6 +338,15 @@ class UploadForm extends SpecialPage { list( $existsType, $file ) = $exists; + if( strpos( $file->getName(), '.' ) == false ) { + $partname = $file->getName(); + $rawExtension = ''; + } else { + $n = strrpos( $file->getName(), '.' ); + $rawExtension = substr( $file->getName(), $n + 1 ); + $partname = substr( $file->getName(), 0, $n ); + } + $sk = $wgUser->getSkin(); if( $existsType == 'exists' ) {