X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderSiteModule.php;h=d28f40f2b19f572a5de2a05bdf9b605f94d90a51;hb=7eca0340f07aaea403aef307702c9d8de4601cc8;hp=03fe1fe5655f33603831be5f6c4643a61ad3e579;hpb=5343b3eb3e4e11634be5e161120d879cd80bf70c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoaderSiteModule.php b/includes/resourceloader/ResourceLoaderSiteModule.php index 03fe1fe565..d28f40f2b1 100644 --- a/includes/resourceloader/ResourceLoaderSiteModule.php +++ b/includes/resourceloader/ResourceLoaderSiteModule.php @@ -32,25 +32,24 @@ class ResourceLoaderSiteModule extends ResourceLoaderWikiModule { /** * Gets list of pages used by this module * - * @param $context ResourceLoaderContext + * @param ResourceLoaderContext $context * - * @return Array: List of pages + * @return array List of pages */ protected function getPages( ResourceLoaderContext $context ) { - global $wgHandheldStyle; + global $wgUseSiteJs, $wgUseSiteCss; - $pages = array( - 'MediaWiki:Common.js' => array( 'type' => 'script' ), - 'MediaWiki:Common.css' => array( 'type' => 'style' ), - 'MediaWiki:' . ucfirst( $context->getSkin() ) . '.js' => array( 'type' => 'script' ), - 'MediaWiki:' . ucfirst( $context->getSkin() ) . '.css' => array( 'type' => 'style' ), - 'MediaWiki:Print.css' => array( 'type' => 'style', 'media' => 'print' ), - ); - if ( $wgHandheldStyle ) { - $pages['MediaWiki:Handheld.css'] = array( - 'type' => 'style', - 'media' => 'handheld' ); + $pages = array(); + if ( $wgUseSiteJs ) { + $pages['MediaWiki:Common.js'] = array( 'type' => 'script' ); + $pages['MediaWiki:' . ucfirst( $context->getSkin() ) . '.js'] = array( 'type' => 'script' ); } + if ( $wgUseSiteCss ) { + $pages['MediaWiki:Common.css'] = array( 'type' => 'style' ); + $pages['MediaWiki:' . ucfirst( $context->getSkin() ) . '.css'] = array( 'type' => 'style' ); + + } + $pages['MediaWiki:Print.css'] = array( 'type' => 'style', 'media' => 'print' ); return $pages; } @@ -58,8 +57,8 @@ class ResourceLoaderSiteModule extends ResourceLoaderWikiModule { /** * Gets group name - * - * @return String: Name of group + * + * @return string Name of group */ public function getGroup() { return 'site';