skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery
[lhc/web/wiklou.git] / includes / filerepo / FileRepo.php
index 3d9a904..455d38f 100644 (file)
@@ -7,6 +7,8 @@
  * @details
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Base code for file repositories.
  *
@@ -638,11 +640,10 @@ class FileRepo {
         * @return string
         */
        public function getNameFromTitle( Title $title ) {
-               global $wgContLang;
                if ( $this->initialCapital != MWNamespace::isCapitalized( NS_FILE ) ) {
                        $name = $title->getUserCaseDBKey();
                        if ( $this->initialCapital ) {
-                               $name = $wgContLang->ucfirst( $name );
+                               $name = MediaWikiServices::getInstance()->getContentLanguage()->ucfirst( $name );
                        }
                } else {
                        $name = $title->getDBkey();
@@ -809,8 +810,9 @@ class FileRepo {
         */
        public function getDescriptionStylesheetUrl() {
                if ( isset( $this->scriptDirUrl ) ) {
-                       return $this->makeUrl( 'title=MediaWiki:Filepage.css&' .
-                               wfArrayToCgi( Skin::getDynamicStylesheetQuery() ) );
+                       // Must match canonical query parameter order for optimum caching
+                       // See Title::getCdnUrls
+                       return $this->makeUrl( 'title=MediaWiki:Filepage.css&action=raw&ctype=text/css' );
                }
 
                return false;
@@ -1350,7 +1352,7 @@ class FileRepo {
        }
 
        /**
-        * Checks existence of a file
+        * Checks existence of a file
         *
         * @param string $file Virtual URL (or storage path) of file to check
         * @return bool