resourceloader: Remove support for Module::getModifiedTime() and getModifiedHash()
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderImageModule.php
index 71a0fa2..e1bddcc 100644 (file)
@@ -224,7 +224,7 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
        public function getImage( $name, ResourceLoaderContext $context ) {
                $this->loadFromDefinition();
                $images = $this->getImages( $context );
-               return isset( $images[$name] ) ? $images[$name] : null;
+               return $images[$name] ?? null;
        }
 
        /**
@@ -241,9 +241,7 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
                if ( !isset( $this->imageObjects[$skin] ) ) {
                        $this->imageObjects[$skin] = [];
                        if ( !isset( $this->images[$skin] ) ) {
-                               $this->images[$skin] = isset( $this->images['default'] ) ?
-                                       $this->images['default'] :
-                                       [];
+                               $this->images[$skin] = $this->images['default'] ?? [];
                        }
                        foreach ( $this->images[$skin] as $name => $options ) {
                                $fileDescriptor = is_string( $options ) ? $options : $options['file'];
@@ -290,9 +288,7 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
                if ( !isset( $this->globalVariants[$skin] ) ) {
                        $this->globalVariants[$skin] = [];
                        if ( !isset( $this->variants[$skin] ) ) {
-                               $this->variants[$skin] = isset( $this->variants['default'] ) ?
-                                       $this->variants['default'] :
-                                       [];
+                               $this->variants[$skin] = $this->variants['default'] ?? [];
                        }
                        foreach ( $this->variants[$skin] as $name => $config ) {
                                if ( isset( $config['global'] ) && $config['global'] ) {
@@ -386,8 +382,6 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
                return [
                        "background-image: $fallbackUrl;",
                        "background-image: linear-gradient(transparent, transparent), $primaryUrl;",
-                       // Do not serve SVG to Opera 12, bad rendering with border-radius or background-size (T87504)
-                       "background-image: -o-linear-gradient(transparent, transparent), $fallbackUrl;",
                ];
        }