X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWebRequestUpload.php;h=c2d08b87fa4c7436c4a6391cd1c8b5a69ef6c0d8;hb=9cbb8f104d66b9b1a5497e12cd931a3827f6b5b3;hp=916a10c9f0777e71f9b34f583da1a833bae944e2;hpb=84851a43f3ea8ea146c4d82c55fd01b9fa302347;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WebRequestUpload.php b/includes/WebRequestUpload.php index 916a10c9f0..c2d08b87fa 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 - * https://secure.php.net/manual/en/features.file-upload.errors.php + * https://www.php.net/manual/en/features.file-upload.errors.php * * @return int One of the UPLOAD_ constants, 0 if non-existent */