dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make "/*@noflip*/ /*@embed*/" annotation work without CSSJanus hacks
[lhc/web/wiklou.git]
/
includes
/
resourceloader
/
ResourceLoaderUserModule.php
diff --git
a/includes/resourceloader/ResourceLoaderUserModule.php
b/includes/resourceloader/ResourceLoaderUserModule.php
index
7454b65
..
1b6d1de
100644
(file)
--- a/
includes/resourceloader/ResourceLoaderUserModule.php
+++ b/
includes/resourceloader/ResourceLoaderUserModule.php
@@
-34,17
+34,20
@@
class ResourceLoaderUserModule extends ResourceLoaderWikiModule {
/* Protected Methods */
/**
/* Protected Methods */
/**
- * @param
$context ResourceLoaderC
ontext
+ * @param
ResourceLoaderContext $c
ontext
* @return array
*/
protected function getPages( ResourceLoaderContext $context ) {
* @return array
*/
protected function getPages( ResourceLoaderContext $context ) {
- global $wgAllowUserJs, $wgAllowUserCss;
$username = $context->getUser();
if ( $username === null ) {
return array();
}
$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();
}
return array();
}
@@
-58,11
+61,11
@@
class ResourceLoaderUserModule extends ResourceLoaderWikiModule {
$userpage = $userpageTitle->getPrefixedDBkey(); // Needed so $excludepages works
$pages = array();
$userpage = $userpageTitle->getPrefixedDBkey(); // Needed so $excludepages works
$pages = array();
- if ( $
wgA
llowUserJs ) {
+ if ( $
a
llowUserJs ) {
$pages["$userpage/common.js"] = array( 'type' => 'script' );
$pages["$userpage/" . $context->getSkin() . '.js'] = array( 'type' => 'script' );
}
$pages["$userpage/common.js"] = array( 'type' => 'script' );
$pages["$userpage/" . $context->getSkin() . '.js'] = array( 'type' => 'script' );
}
- if ( $
wgA
llowUserCss ) {
+ if ( $
a
llowUserCss ) {
$pages["$userpage/common.css"] = array( 'type' => 'style' );
$pages["$userpage/" . $context->getSkin() . '.css'] = array( 'type' => 'style' );
}
$pages["$userpage/common.css"] = array( 'type' => 'style' );
$pages["$userpage/" . $context->getSkin() . '.css'] = array( 'type' => 'style' );
}