r81684 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81683‎ | r81684 | r81685 >
Date:02:48, 8 February 2011
Author:brion
Status:ok
Tags:
Comment:
MFT r81675: avoid creating unneeded skin objects due to changes in r70900, r72481
Modified paths:
  • /branches/REL1_17/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/includes/User.php
@@ -2255,21 +2255,16 @@
22562256 * @todo FIXME : need to check the old failback system [AV]
22572257 */
22582258 function getSkin( $t = null ) {
2259 - if ( $t ) {
 2259+ if( !$this->mSkin ) {
 2260+ global $wgOut;
 2261+ $this->mSkin = $this->createSkinObject();
 2262+ $this->mSkin->setTitle( $wgOut->getTitle() );
 2263+ }
 2264+ if ( $t && !$t->equals( $this->mSkin->getTitle() ) ) {
22602265 $skin = $this->createSkinObject();
22612266 $skin->setTitle( $t );
22622267 return $skin;
22632268 } else {
2264 - if ( !$this->mSkin ) {
2265 - $this->mSkin = $this->createSkinObject();
2266 - }
2267 -
2268 - if ( !$this->mSkin->getTitle() ) {
2269 - global $wgOut;
2270 - $t = $wgOut->getTitle();
2271 - $this->mSkin->setTitle($t);
2272 - }
2273 -
22742269 return $this->mSkin;
22752270 }
22762271 }
Property changes on: branches/REL1_17/phase3/includes/User.php
___________________________________________________________________
Added: svn:mergeinfo
22772272 Merged /branches/sqlite/includes/User.php:r58211-58321
22782273 Merged /trunk/phase3/includes/User.php:r81675
22792274 Merged /branches/new-installer/phase3/includes/User.php:r43664-66004
22802275 Merged /branches/wmf-deployment/includes/User.php:r53381
22812276 Merged /branches/REL1_15/phase3/includes/User.php:r51646

Follow-up revisions

RevisionCommit summaryAuthorDate
r81685MFT from r81675 via REL1_17 r81684: cleanup for r70900, r72481brion02:50, 8 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70900getSkin() should get a Title as parameter.platonides17:11, 11 August 2010
r72481Rewrite User::getSkin, broken in r49493 because requesting the skin for a par...werdna12:11, 6 September 2010
r81675Cleanup to r70900, r72481: don't construct new skin objects just because the ...demon01:08, 8 February 2011

Status & tagging log