From: Chad Horohoe Date: Tue, 2 Nov 2010 20:18:15 +0000 (+0000) Subject: Cleanup r49493, r72481: Adding skin to $wgHiddenPrefs disabled the useskin parameter X-Git-Tag: 1.31.0-rc.0~34124 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=a31a935e0ee5f990c65615783b862cded8a9eb30;p=lhc%2Fweb%2Fwiklou.git Cleanup r49493, r72481: Adding skin to $wgHiddenPrefs disabled the useskin parameter --- diff --git a/includes/User.php b/includes/User.php index 25e0e520ae..6d44b8de92 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2258,16 +2258,16 @@ class User { $skin->setTitle( $t ); return $skin; } else { - if ( ! $this->mSkin ) { + if ( !$this->mSkin ) { $this->mSkin = $this->createSkinObject(); } - - if ( ! $this->mSkin->getTitle() ) { + + if ( !$this->mSkin->getTitle() ) { global $wgOut; $t = $wgOut->getTitle(); $this->mSkin->setTitle($t); } - + return $this->mSkin; } } @@ -2276,18 +2276,18 @@ class User { private function createSkinObject() { wfProfileIn( __METHOD__ ); - global $wgHiddenPrefs; + global $wgHiddenPrefs, $wgRequest; if( !in_array( 'skin', $wgHiddenPrefs ) ) { # get the user skin - global $wgRequest; $userSkin = $this->getOption( 'skin' ); - $userSkin = $wgRequest->getVal( 'useskin', $userSkin ); } else { # if we're not allowing users to override, then use the default global $wgDefaultSkin; $userSkin = $wgDefaultSkin; } + $userSkin = $wgRequest->getVal( 'useskin', $userSkin ); + $skin = Skin::newFromKey( $userSkin ); wfProfileOut( __METHOD__ );