From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- .../ResourceLoaderUserGroupsModule.php | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 includes/resourceloader/ResourceLoaderUserGroupsModule.php (limited to 'includes/resourceloader/ResourceLoaderUserGroupsModule.php') diff --git a/includes/resourceloader/ResourceLoaderUserGroupsModule.php b/includes/resourceloader/ResourceLoaderUserGroupsModule.php new file mode 100644 index 00000000..733dfa04 --- /dev/null +++ b/includes/resourceloader/ResourceLoaderUserGroupsModule.php @@ -0,0 +1,59 @@ +getUser() ) { + $user = User::newFromName( $context->getUser() ); + if ( $user instanceof User ) { + $pages = array(); + foreach( $user->getEffectiveGroups() as $group ) { + if ( in_array( $group, array( '*', 'user' ) ) ) { + continue; + } + $pages["MediaWiki:Group-$group.js"] = array( 'type' => 'script' ); + $pages["MediaWiki:Group-$group.css"] = array( 'type' => 'style' ); + } + return $pages; + } + } + return array(); + } + + /* Methods */ + + /** + * @return string + */ + public function getGroup() { + return 'user'; + } +} -- cgit v1.2.3-54-g00ecf