Index: trunk/phase3/includes/User.php |
— | — | @@ -2247,21 +2247,16 @@ |
2248 | 2248 | * @todo: FIXME : need to check the old failback system [AV] |
2249 | 2249 | */ |
2250 | 2250 | function getSkin( $t = null ) { |
2251 | | - if ( $t ) { |
| 2251 | + if( !$this->mSkin ) { |
| 2252 | + global $wgOut; |
| 2253 | + $this->mSkin = $this->createSkinObject(); |
| 2254 | + $this->mSkin->setTitle( $wgOut->getTitle() ); |
| 2255 | + } |
| 2256 | + if ( $t && !$t->equals( $this->mSkin->getTitle() ) ) { |
2252 | 2257 | $skin = $this->createSkinObject(); |
2253 | 2258 | $skin->setTitle( $t ); |
2254 | 2259 | return $skin; |
2255 | 2260 | } else { |
2256 | | - if ( !$this->mSkin ) { |
2257 | | - $this->mSkin = $this->createSkinObject(); |
2258 | | - } |
2259 | | - |
2260 | | - if ( !$this->mSkin->getTitle() ) { |
2261 | | - global $wgOut; |
2262 | | - $t = $wgOut->getTitle(); |
2263 | | - $this->mSkin->setTitle($t); |
2264 | | - } |
2265 | | - |
2266 | 2261 | return $this->mSkin; |
2267 | 2262 | } |
2268 | 2263 | } |