r75873 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75872‎ | r75873 | r75874 >
Date:20:18, 2 November 2010
Author:demon
Status:reverted (Comments)
Tags:
Comment:
Cleanup r49493, r72481: Adding skin to $wgHiddenPrefs disabled the useskin parameter
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -2258,16 +2258,16 @@
22592259 $skin->setTitle( $t );
22602260 return $skin;
22612261 } else {
2262 - if ( ! $this->mSkin ) {
 2262+ if ( !$this->mSkin ) {
22632263 $this->mSkin = $this->createSkinObject();
22642264 }
2265 -
2266 - if ( ! $this->mSkin->getTitle() ) {
 2265+
 2266+ if ( !$this->mSkin->getTitle() ) {
22672267 global $wgOut;
22682268 $t = $wgOut->getTitle();
22692269 $this->mSkin->setTitle($t);
22702270 }
2271 -
 2271+
22722272 return $this->mSkin;
22732273 }
22742274 }
@@ -2276,18 +2276,18 @@
22772277 private function createSkinObject() {
22782278 wfProfileIn( __METHOD__ );
22792279
2280 - global $wgHiddenPrefs;
 2280+ global $wgHiddenPrefs, $wgRequest;
22812281 if( !in_array( 'skin', $wgHiddenPrefs ) ) {
22822282 # get the user skin
2283 - global $wgRequest;
22842283 $userSkin = $this->getOption( 'skin' );
2285 - $userSkin = $wgRequest->getVal( 'useskin', $userSkin );
22862284 } else {
22872285 # if we're not allowing users to override, then use the default
22882286 global $wgDefaultSkin;
22892287 $userSkin = $wgDefaultSkin;
22902288 }
22912289
 2290+ $userSkin = $wgRequest->getVal( 'useskin', $userSkin );
 2291+
22922292 $skin = Skin::newFromKey( $userSkin );
22932293 wfProfileOut( __METHOD__ );
22942294

Follow-up revisions

RevisionCommit summaryAuthorDate
r75929Per CR, revert r75873. Does not match docsdemon13:55, 3 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r49493initPage() is far too late to be setting a title, so we'll do it right after ...demon04:43, 15 April 2009
r72481Rewrite User::getSkin, broken in r49493 because requesting the skin for a par...werdna12:11, 6 September 2010

Comments

#Comment by Umherirrender (talk | contribs)   13:49, 3 November 2010

Looks like intended: Manual:Skin configuration#1.16 and newer: "This will remove the "Skin" tab from preferences and the possibility to use the useskin parameter in the URL.".

With this change you "allowing users to override" the default (compare with comment in else)

Status & tagging log