X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderImageModule.php;h=5e329e84b47330f6224cd49bdf27c8c8040b344b;hb=d84c3dde5af90c5c3497d18e427a5c2a38ac6ca8;hp=cbcf5a0d623f3bec41a707f652ab228a97d911d3;hpb=0be80f9680ae5acba1931f18fdecd0e3c634d6a6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoaderImageModule.php b/includes/resourceloader/ResourceLoaderImageModule.php index cbcf5a0d62..5e329e84b4 100644 --- a/includes/resourceloader/ResourceLoaderImageModule.php +++ b/includes/resourceloader/ResourceLoaderImageModule.php @@ -249,7 +249,7 @@ class ResourceLoaderImageModule extends ResourceLoaderModule { $fileDescriptor = is_string( $options ) ? $options : $options['file']; $allowedVariants = array_merge( - is_array( $options ) && isset( $options['variants'] ) ? $options['variants'] : [], + ( is_array( $options ) && isset( $options['variants'] ) ) ? $options['variants'] : [], $this->getGlobalVariants( $context ) ); if ( isset( $this->variants[$skin] ) ) { @@ -381,11 +381,11 @@ class ResourceLoaderImageModule extends ResourceLoaderModule { * @return string[] CSS declarations to use given URIs as background-image */ protected function getCssDeclarations( $primary, $fallback ) { + $primaryUrl = CSSMin::buildUrlValue( $primary ); + $fallbackUrl = CSSMin::buildUrlValue( $fallback ); return [ - "background-image: url($fallback);", - "background-image: linear-gradient(transparent, transparent), url($primary);", - // Do not serve SVG to Opera 12, bad rendering with border-radius or background-size (T87504) - "background-image: -o-linear-gradient(transparent, transparent), url($fallback);", + "background-image: $fallbackUrl;", + "background-image: linear-gradient(transparent, transparent), $primaryUrl;", ]; }