Index: trunk/phase3/includes/User.php |
— | — | @@ -2144,11 +2144,12 @@ |
2145 | 2145 | } |
2146 | 2146 | |
2147 | 2147 | /** |
2148 | | - * Get the current skin, loading it if required |
2149 | | - * @return \type{Skin} Current skin |
| 2148 | + * Get the current skin, loading it if required, and setting a title |
| 2149 | + * @param Title $t The title to use in the skin |
| 2150 | + * @return Skin The current skin |
2150 | 2151 | * @todo FIXME : need to check the old failback system [AV] |
2151 | 2152 | */ |
2152 | | - function &getSkin() { |
| 2153 | + function &getSkin( $t = null ) { |
2153 | 2154 | global $wgRequest, $wgAllowUserSkin, $wgDefaultSkin; |
2154 | 2155 | if ( ! isset( $this->mSkin ) ) { |
2155 | 2156 | wfProfileIn( __METHOD__ ); |
— | — | @@ -2165,6 +2166,11 @@ |
2166 | 2167 | $this->mSkin =& Skin::newFromKey( $userSkin ); |
2167 | 2168 | wfProfileOut( __METHOD__ ); |
2168 | 2169 | } |
| 2170 | + if ( !$t ) { |
| 2171 | + global $wgOut; |
| 2172 | + $t = $wgOut->getTitle(); |
| 2173 | + } |
| 2174 | + $this->mSkin->setTitle( $t ); |
2169 | 2175 | return $this->mSkin; |
2170 | 2176 | } |
2171 | 2177 | |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -176,8 +176,6 @@ |
177 | 177 | |
178 | 178 | wfProfileIn( __METHOD__ ); |
179 | 179 | |
180 | | - $this->mTitle = $out->getTitle(); |
181 | | - |
182 | 180 | # Generally the order of the favicon and apple-touch-icon links |
183 | 181 | # should not matter, but Konqueror (3.5.9 at least) incorrectly |
184 | 182 | # uses whichever one appears later in the HTML source. Make sure |
— | — | @@ -268,12 +266,23 @@ |
269 | 267 | } |
270 | 268 | } |
271 | 269 | |
272 | | - function setMembers(){ |
| 270 | + /** |
| 271 | + * Set some local globals |
| 272 | + */ |
| 273 | + protected function setMembers(){ |
273 | 274 | global $wgUser; |
274 | 275 | $this->mUser = $wgUser; |
275 | 276 | $this->userpage = $wgUser->getUserPage()->getPrefixedText(); |
276 | 277 | $this->usercss = false; |
277 | 278 | } |
| 279 | + |
| 280 | + /** |
| 281 | + * Set the title |
| 282 | + * @param Title $t The title to use |
| 283 | + */ |
| 284 | + public function setTitle( $t ) { |
| 285 | + $this->mTitle = $t; |
| 286 | + } |
278 | 287 | |
279 | 288 | function outputPage( OutputPage $out ) { |
280 | 289 | global $wgDebugComments; |