Merge "Localisation updates from https://translatewiki.net."
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderWikiModule.php
index 085244a..ff5de0d 100644 (file)
@@ -285,7 +285,7 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
                        if ( $options['type'] !== 'style' ) {
                                continue;
                        }
-                       $media = isset( $options['media'] ) ? $options['media'] : 'all';
+                       $media = $options['media'] ?? 'all';
                        $style = $this->getContent( $titleText, $context );
                        if ( strval( $style ) === '' ) {
                                continue;
@@ -534,6 +534,8 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
        ) {
                static $formats = [ CONTENT_FORMAT_CSS, CONTENT_FORMAT_JAVASCRIPT ];
 
+               // TODO: MCR: differentiate between page functionality and content model!
+               //       Not all pages containing CSS or JS have to be modules! [PageType]
                if ( $old && in_array( $old->getContentFormat(), $formats ) ) {
                        $purge = true;
                } elseif ( $new && in_array( $new->getContentFormat(), $formats ) ) {