Index: trunk/phase3/skins/Standard.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | */ |
25 | 25 | function setupSkinUserCss( OutputPage $out ){ |
26 | 26 | parent::setupSkinUserCss( $out ); |
27 | | - $out->AddModuleStyles( 'skins.standard' ); |
| 27 | + $out->addModuleStyles( 'skins.standard' ); |
28 | 28 | |
29 | 29 | $qb = $this->qbSetting(); |
30 | 30 | $rules = array(); |
— | — | @@ -111,7 +111,8 @@ |
112 | 112 | |
113 | 113 | $action = $wgRequest->getText( 'action' ); |
114 | 114 | $wpPreview = $wgRequest->getBool( 'wpPreview' ); |
115 | | - $tns = $this->getSkin()->getTitle()->getNamespace(); |
| 115 | + $title = $this->getSkin()->getTitle(); |
| 116 | + $tns = $title->getNamespace(); |
116 | 117 | |
117 | 118 | $s = "\n<div id='quickbar'>"; |
118 | 119 | $s .= "\n" . $this->getSkin()->logoText() . "\n<hr class='sep' />"; |
— | — | @@ -151,7 +152,7 @@ |
152 | 153 | } |
153 | 154 | |
154 | 155 | $s .= "\n<hr class='sep' />"; |
155 | | - $articleExists = $this->getSkin()->getTitle()->getArticleId(); |
| 156 | + $articleExists = $title->getArticleId(); |
156 | 157 | if ( $wgOut->isArticle() || $action == 'edit' || $action == 'history' || $wpPreview ) { |
157 | 158 | if( $wgOut->isArticle() ) { |
158 | 159 | $s .= '<strong>' . $this->editThisPage() . '</strong>'; |
— | — | @@ -196,14 +197,14 @@ |
197 | 198 | $text = wfMsg( 'articlepage' ); |
198 | 199 | } |
199 | 200 | |
200 | | - $link = $this->getSkin()->getTitle()->getText(); |
| 201 | + $link = $title->getText(); |
201 | 202 | $nstext = $wgContLang->getNsText( $tns ); |
202 | 203 | if( $nstext ) { # add namespace if necessary |
203 | 204 | $link = $nstext . ':' . $link; |
204 | 205 | } |
205 | 206 | |
206 | 207 | $s .= Linker::link( Title::newFromText( $link ), $text ); |
207 | | - } elseif( $this->getSkin()->getTitle()->getNamespace() != NS_SPECIAL ) { |
| 208 | + } elseif( $title->getNamespace() != NS_SPECIAL ) { |
208 | 209 | # we just throw in a "New page" text to tell the user that he's in edit mode, |
209 | 210 | # and to avoid messing with the separator that is prepended to the next item |
210 | 211 | $s .= '<strong>' . wfMsg( 'newpage' ) . '</strong>'; |
— | — | @@ -211,16 +212,15 @@ |
212 | 213 | } |
213 | 214 | |
214 | 215 | # "Post a comment" link |
215 | | - if( ( $this->getSkin()->getTitle()->isTalkPage() || $wgOut->showNewSectionLink() ) && $action != 'edit' && !$wpPreview ) |
216 | | - $s .= '<br />' . $this->getSkin()->link( |
217 | | - $this->getSkin()->getTitle(), |
| 216 | + if( ( $title->isTalkPage() || $wgOut->showNewSectionLink() ) && $action != 'edit' && !$wpPreview ) |
| 217 | + $s .= '<br />' . Linker::link( |
| 218 | + $title, |
218 | 219 | wfMsg( 'postcomment' ), |
219 | 220 | array(), |
220 | 221 | array( |
221 | 222 | 'action' => 'edit', |
222 | 223 | 'section' => 'new' |
223 | | - ), |
224 | | - array( 'known', 'noclasses' ) |
| 224 | + ) |
225 | 225 | ); |
226 | 226 | |
227 | 227 | /* |
— | — | @@ -233,7 +233,7 @@ |
234 | 234 | if( $action != 'edit' && $action != 'submit' ) { |
235 | 235 | $s .= $sep . $this->watchThisPage(); |
236 | 236 | } |
237 | | - if ( $this->getSkin()->getTitle()->userCan( 'edit' ) ) |
| 237 | + if ( $title->userCan( 'edit' ) ) |
238 | 238 | $s .= $sep . $this->moveThisPage(); |
239 | 239 | } |
240 | 240 | if ( $wgUser->isAllowed( 'delete' ) && $articleExists ) { |
— | — | @@ -251,12 +251,12 @@ |
252 | 252 | } |
253 | 253 | |
254 | 254 | if ( |
255 | | - NS_USER == $this->getSkin()->getTitle()->getNamespace() || |
256 | | - $this->getSkin()->getTitle()->getNamespace() == NS_USER_TALK |
| 255 | + NS_USER == $title->getNamespace() || |
| 256 | + $title->getNamespace() == NS_USER_TALK |
257 | 257 | ) { |
258 | 258 | |
259 | | - $id = User::idFromName( $this->getSkin()->getTitle()->getText() ); |
260 | | - $ip = User::isIP( $this->getSkin()->getTitle()->getText() ); |
| 259 | + $id = User::idFromName( $title->getText() ); |
| 260 | + $ip = User::isIP( $title->getText() ); |
261 | 261 | |
262 | 262 | if( $id || $ip ){ |
263 | 263 | $s .= $sep . $this->userContribsLink(); |