X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderUserModule.php;h=1b6d1de07cfe175f8b5062cddfe9c4f5e854c897;hb=4c01f8b2bc45da2fa4df29b8dfb14202bb2b4713;hp=90b4838f92989a47b258d77fc988ab969f490ccf;hpb=ed945112a8640fcaefa0128456602893294aee31;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoaderUserModule.php b/includes/resourceloader/ResourceLoaderUserModule.php index 90b4838f92..1b6d1de07c 100644 --- a/includes/resourceloader/ResourceLoaderUserModule.php +++ b/includes/resourceloader/ResourceLoaderUserModule.php @@ -38,13 +38,16 @@ class ResourceLoaderUserModule extends ResourceLoaderWikiModule { * @return array */ protected function getPages( ResourceLoaderContext $context ) { - global $wgAllowUserJs, $wgAllowUserCss; $username = $context->getUser(); if ( $username === null ) { return array(); } - if ( !$wgAllowUserJs && !$wgAllowUserCss ) { + + $allowUserJs = $this->getConfig()->get( 'AllowUserJs' ); + $allowUserCss = $this->getConfig()->get( 'AllowUserCss' ); + + if ( !$allowUserJs && !$allowUserCss ) { return array(); } @@ -58,11 +61,11 @@ class ResourceLoaderUserModule extends ResourceLoaderWikiModule { $userpage = $userpageTitle->getPrefixedDBkey(); // Needed so $excludepages works $pages = array(); - if ( $wgAllowUserJs ) { + if ( $allowUserJs ) { $pages["$userpage/common.js"] = array( 'type' => 'script' ); $pages["$userpage/" . $context->getSkin() . '.js'] = array( 'type' => 'script' ); } - if ( $wgAllowUserCss ) { + if ( $allowUserCss ) { $pages["$userpage/common.css"] = array( 'type' => 'style' ); $pages["$userpage/" . $context->getSkin() . '.css'] = array( 'type' => 'style' ); }