diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /includes/resourceloader/ResourceLoaderUserModule.php | |
parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
Diffstat (limited to 'includes/resourceloader/ResourceLoaderUserModule.php')
-rw-r--r-- | includes/resourceloader/ResourceLoaderUserModule.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/includes/resourceloader/ResourceLoaderUserModule.php b/includes/resourceloader/ResourceLoaderUserModule.php index 7a04e473..1b6d1de0 100644 --- a/includes/resourceloader/ResourceLoaderUserModule.php +++ b/includes/resourceloader/ResourceLoaderUserModule.php @@ -27,21 +27,27 @@ */ class ResourceLoaderUserModule extends ResourceLoaderWikiModule { - /* Protected Methods */ + /* Protected Members */ + protected $origin = self::ORIGIN_USER_INDIVIDUAL; + /* Protected Methods */ + /** - * @param $context ResourceLoaderContext + * @param ResourceLoaderContext $context * @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(); } @@ -55,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' ); } |