X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWebRequestUpload.php;h=34c606204c9595b74e4489f2895b340dfcb9326e;hb=0fb6bd09b0aa0741316007a6ea1b62ec4518d7b3;hp=c741907d3eebddf9de70c8838b2fbdb41f2ddea2;hpb=2f885ee6b797e5a176ce7b270b674a04b5945b06;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WebRequestUpload.php b/includes/WebRequestUpload.php index c741907d3e..34c606204c 100644 --- a/includes/WebRequestUpload.php +++ b/includes/WebRequestUpload.php @@ -20,6 +20,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * Object to access the $_FILES array * @@ -63,13 +65,12 @@ class WebRequestUpload { return null; } - global $wgContLang; $name = $this->fileInfo['name']; # Safari sends filenames in HTML-encoded Unicode form D... # Horrid and evil! Let's try to make some kind of sense of it. $name = Sanitizer::decodeCharReferences( $name ); - $name = $wgContLang->normalize( $name ); + $name = MediaWikiServices::getInstance()->getContentLanguage()->normalize( $name ); wfDebug( __METHOD__ . ": {$this->fileInfo['name']} normalized to '$name'\n" ); return $name; } @@ -102,7 +103,7 @@ class WebRequestUpload { /** * Return the upload error. See link for explanation - * http://www.php.net/manual/en/features.file-upload.errors.php + * https://secure.php.net/manual/en/features.file-upload.errors.php * * @return int One of the UPLOAD_ constants, 0 if non-existent */