From: Catrope Date: Wed, 13 Jun 2012 23:50:13 +0000 (-0700) Subject: Fix media type handling for CSS that's not loaded with only=styles X-Git-Tag: 1.31.0-rc.0~23331 X-Git-Url: http://git.cyclocoop.org/%22%20.%20%20%20%24self2%20.%20%20%20%22&var_mode_affiche=boucle?a=commitdiff_plain;h=15e5193a19fb55339e60d192142dfd7c2e546596;p=lhc%2Fweb%2Fwiklou.git Fix media type handling for CSS that's not loaded with only=styles We were only doing server-side @media wrapping in only=styles mode but not in regular mode. Meanwhile, the client-side loader had dropped all support for media types under the assumption that this was all handled server side, which caused media type handling to break for modules loaded the normal way. We didn't notice this before because the only core module that uses this is skins.vector, which is loaded through only=styles. Change-Id: I8228cc0317328440256b45b166eef1b57dbf4602 --- diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 9e884942fb..599f43e447 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -752,8 +752,12 @@ class ResourceLoader { } } } - $out .= self::makeLoaderImplementScript( $name, $scripts, $styles, - new XmlJsCode( $messagesBlob ) ); + $out .= self::makeLoaderImplementScript( + $name, + $scripts, + self::makeCombinedStyles( $styles ), + new XmlJsCode( $messagesBlob ) + ); break; } } catch ( Exception $e ) {