X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FFileRepo.php;h=51cef8102956e3b1720a75d76f885b04dcb1a952;hb=4339d71ed4c144b53b70aa3e048c3276dfd5bd61;hp=3a366c832c2933c9e97d3973d36141c7c03f5599;hpb=31e768e643bd513daa3e8b9720c2f3944ac7092c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 3a366c832c..51cef81029 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -176,7 +176,8 @@ class FileRepo { } // Optional settings that have a default - $this->initialCapital = $info['initialCapital'] ?? MWNamespace::isCapitalized( NS_FILE ); + $this->initialCapital = $info['initialCapital'] ?? + MediaWikiServices::getInstance()->getNamespaceInfo()->isCapitalized( NS_FILE ); $this->url = $info['url'] ?? false; // a subclass may set the URL (e.g. ForeignAPIRepo) if ( isset( $info['thumbUrl'] ) ) { $this->thumbUrl = $info['thumbUrl']; @@ -645,7 +646,10 @@ class FileRepo { * @return string */ public function getNameFromTitle( Title $title ) { - if ( $this->initialCapital != MWNamespace::isCapitalized( NS_FILE ) ) { + if ( + $this->initialCapital != + MediaWikiServices::getInstance()->getNamespaceInfo()->isCapitalized( NS_FILE ) + ) { $name = $title->getUserCaseDBKey(); if ( $this->initialCapital ) { $name = MediaWikiServices::getInstance()->getContentLanguage()->ucfirst( $name ); @@ -1685,7 +1689,7 @@ class FileRepo { /** * Get a callback function to use for cleaning error message parameters * - * @return string[] + * @return callable */ function getErrorCleanupFunction() { switch ( $this->pathDisclosureProtection ) {