summaryrefslogtreecommitdiff
path: root/includes/resourceloader/ResourceLoaderSiteModule.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/resourceloader/ResourceLoaderSiteModule.php')
-rw-r--r--includes/resourceloader/ResourceLoaderSiteModule.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/includes/resourceloader/ResourceLoaderSiteModule.php b/includes/resourceloader/ResourceLoaderSiteModule.php
index 1cc5c1a9..05754d37 100644
--- a/includes/resourceloader/ResourceLoaderSiteModule.php
+++ b/includes/resourceloader/ResourceLoaderSiteModule.php
@@ -37,20 +37,19 @@ class ResourceLoaderSiteModule extends ResourceLoaderWikiModule {
* @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;
}