Added a new user right called "alwaysuseskin" that allows the user to
authorCharles Melbye <charlie@users.mediawiki.org>
Sun, 16 Nov 2008 20:57:21 +0000 (20:57 +0000)
committerCharles Melbye <charlie@users.mediawiki.org>
Sun, 16 Nov 2008 20:57:21 +0000 (20:57 +0000)
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
includes/specials/SpecialPreferences.php

index 898a9f3..6ddd3c6 100644 (file)
@@ -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);
index 9f5329f..fb9e703 100644 (file)
@@ -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;