From ae59bad3d88cdbac3e5f4d1514d652009f6abfb7 Mon Sep 17 00:00:00 2001 From: Charles Melbye Date: Sun, 16 Nov 2008 20:57:21 +0000 Subject: [PATCH] Added a new user right called "alwaysuseskin" that allows the user to use and set their configured skin even if the wiki administrator has chosen to disable user skins for the rest of the wiki. Req. by Alexfusco5. --- includes/User.php | 2 +- includes/specials/SpecialPreferences.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/User.php b/includes/User.php index 898a9f34d1..6ddd3c677c 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2109,7 +2109,7 @@ class User { if ( ! isset( $this->mSkin ) ) { wfProfileIn( __METHOD__ ); - if( $wgAllowUserSkin ) { + if( $wgAllowUserSkin || $this->isAllowed( 'alwaysuseskin' ) ) { # get the user skin $userSkin = $this->getOption( 'skin' ); $userSkin = $wgRequest->getVal('useskin', $userSkin); diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 9f5329fca6..fb9e703526 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -269,7 +269,7 @@ class PreferencesForm { $wgUser->setOption( 'nickname', $this->mNick ); $wgUser->setOption( 'quickbar', $this->mQuickbar ); global $wgAllowUserSkin; - if( $wgAllowUserSkin ) { + if( $wgAllowUserSkin || $wgUser->isAllowed( 'alwaysuseskin' ) ) { $wgUser->setOption( 'skin', $this->mSkin ); } global $wgUseTeX; -- 2.20.1