Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -199,8 +199,6 @@ |
200 | 200 | * @return string |
201 | 201 | */ |
202 | 202 | function quickBar(){ |
203 | | - $tns = $this->getSkin()->getTitle()->getNamespace(); |
204 | | - |
205 | 203 | $s = "\n<div id='quickbar'>"; |
206 | 204 | |
207 | 205 | $sep = '<br />'; |
— | — | @@ -237,6 +235,8 @@ |
238 | 236 | $barnumber++; |
239 | 237 | } |
240 | 238 | |
| 239 | + $user = $this->getSkin()->getUser(); |
| 240 | + |
241 | 241 | if ( $this->data['isarticle'] ) { |
242 | 242 | $s .= $this->menuHead( 'qbedit' ); |
243 | 243 | $s .= '<strong>' . $this->editThisPage() . '</strong>'; |
— | — | @@ -249,13 +249,13 @@ |
250 | 250 | if( $this->data['loggedin'] ) { |
251 | 251 | $s .= $sep . $this->moveThisPage(); |
252 | 252 | } |
253 | | - if ( $this->getSkin()->getUser()->isAllowed( 'delete' ) ) { |
| 253 | + if ( $user->isAllowed( 'delete' ) ) { |
254 | 254 | $dtp = $this->deleteThisPage(); |
255 | 255 | if ( $dtp != '' ) { |
256 | 256 | $s .= $sep . $dtp; |
257 | 257 | } |
258 | 258 | } |
259 | | - if ( $this->getSkin()->getUser()->isAllowed( 'protect' ) ) { |
| 259 | + if ( $user->isAllowed( 'protect' ) ) { |
260 | 260 | $ptp = $this->protectThisPage(); |
261 | 261 | if ( $ptp != '' ) { |
262 | 262 | $s .= $sep . $ptp; |
— | — | @@ -278,8 +278,10 @@ |
279 | 279 | . $sep . $this->whatLinksHere() |
280 | 280 | . $sep . $this->watchPageLinksLink(); |
281 | 281 | |
282 | | - if( $tns == NS_USER || $tns == NS_USER_TALK ) { |
283 | | - $id = User::idFromName( $this->getSkin()->getTitle()->getText() ); |
| 282 | + $title = $this->getSkin()->getTitle(); |
| 283 | + $tns = $title->getNamespace(); |
| 284 | + if ( $tns == NS_USER || $tns == NS_USER_TALK ) { |
| 285 | + $id = User::idFromName( $title->getText() ); |
284 | 286 | if( $id != 0 ) { |
285 | 287 | $s .= $sep . $this->userContribsLink(); |
286 | 288 | if( $this->getSkin()->showEmailUser( $id ) ) { |
— | — | @@ -293,18 +295,18 @@ |
294 | 296 | $s .= $this->menuHead( 'qbmyoptions' ); |
295 | 297 | if ( $this->data['loggedin'] ) { |
296 | 298 | $tl = Linker::link( |
297 | | - $this->getSkin()->getUser()->getTalkPage(), |
| 299 | + $user->getTalkPage(), |
298 | 300 | wfMsg( 'mytalk' ), |
299 | 301 | array(), |
300 | 302 | array(), |
301 | 303 | array( 'known', 'noclasses' ) |
302 | 304 | ); |
303 | | - if ( $this->getSkin()->getUser()->getNewtalk() ) { |
| 305 | + if ( $user->getNewtalk() ) { |
304 | 306 | $tl .= ' *'; |
305 | 307 | } |
306 | 308 | |
307 | 309 | $s .= Linker::link( |
308 | | - $this->getSkin()->getUser()->getUserPage(), |
| 310 | + $user->getUserPage(), |
309 | 311 | wfMsg( 'mypage' ), |
310 | 312 | array(), |
311 | 313 | array(), |
— | — | @@ -312,7 +314,7 @@ |
313 | 315 | ) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' ) |
314 | 316 | . $sep . |
315 | 317 | Linker::link( |
316 | | - SpecialPage::getSafeTitleFor( 'Contributions', $this->getSkin()->getUser()->getName() ), |
| 318 | + SpecialPage::getSafeTitleFor( 'Contributions', $user->getName() ), |
317 | 319 | wfMsg( 'mycontris' ), |
318 | 320 | array(), |
319 | 321 | array(), |
— | — | @@ -327,7 +329,7 @@ |
328 | 330 | . Linker::specialLink( 'Newpages' ) |
329 | 331 | . $sep . Linker::specialLink( 'Listfiles' ) |
330 | 332 | . $sep . Linker::specialLink( 'Statistics' ); |
331 | | - if( UploadBase::isEnabled() && UploadBase::isAllowed( $this->getSkin()->getUser() ) === true ) { |
| 333 | + if( UploadBase::isEnabled() && UploadBase::isAllowed( $user ) === true ) { |
332 | 334 | $s .= $sep . $this->getUploadLink(); |
333 | 335 | } |
334 | 336 | |