Index: trunk/phase3/skins/Simple.php |
— | — | @@ -30,16 +30,15 @@ |
31 | 31 | $out->addModuleStyles( 'skins.simple' ); |
32 | 32 | |
33 | 33 | /* Add some userprefs specific CSS styling */ |
34 | | - global $wgUser; |
35 | 34 | $rules = array(); |
36 | 35 | $underline = ""; |
37 | 36 | |
38 | | - if ( $wgUser->getOption( 'underline' ) < 2 ) { |
39 | | - $underline = "text-decoration: " . $wgUser->getOption( 'underline' ) ? 'underline !important' : 'none' . ";"; |
| 37 | + if ( $this->getSkin()->getUser()->getOption( 'underline' ) < 2 ) { |
| 38 | + $underline = "text-decoration: " . $this->getSkin()->getUser()->getOption( 'underline' ) ? 'underline !important' : 'none' . ";"; |
40 | 39 | } |
41 | 40 | |
42 | 41 | /* Also inherits from resourceloader */ |
43 | | - if( !$wgUser->getOption( 'highlightbroken' ) ) { |
| 42 | + if( !$this->getSkin()->getUser()->getOption( 'highlightbroken' ) ) { |
44 | 43 | $rules[] = "a.new, a.stub { color: inherit; text-decoration: inherit;}"; |
45 | 44 | $rules[] = "a.new:after { color: #CC2200; $underline;}"; |
46 | 45 | $rules[] = "a.stub:after { $underline; }"; |
Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -101,8 +101,6 @@ |
102 | 102 | * @return string |
103 | 103 | */ |
104 | 104 | function doAfterContent(){ |
105 | | - global $wgLang; |
106 | | - |
107 | 105 | $s = "\n</div><br clear='all' />\n"; |
108 | 106 | |
109 | 107 | $s .= "\n<div id='footer'>"; |
— | — | @@ -115,7 +113,7 @@ |
116 | 114 | $s .= '<td class="bottom">'; |
117 | 115 | |
118 | 116 | $s .= $this->bottomLinks(); |
119 | | - $s .= $wgLang->pipeList( array( |
| 117 | + $s .= $this->getSkin()->getLang()->pipeList( array( |
120 | 118 | "\n<br />" . Linker::link( |
121 | 119 | Title::newMainPage(), |
122 | 120 | null, |
— | — | @@ -145,7 +143,6 @@ |
146 | 144 | * @return string |
147 | 145 | */ |
148 | 146 | function sysLinks() { |
149 | | - global $wgUser, $wgLang; |
150 | 147 | $li = SpecialPage::getTitleFor( 'Userlogin' ); |
151 | 148 | $lo = SpecialPage::getTitleFor( 'Userlogout' ); |
152 | 149 | |
— | — | @@ -180,7 +177,7 @@ |
181 | 178 | if( $this->extensionTabLinks() ) { |
182 | 179 | $s[] = $this->extensionTabLinks(); |
183 | 180 | } |
184 | | - if ( $wgUser->isLoggedIn() ) { |
| 181 | + if ( $this->data['loggedin'] ) { |
185 | 182 | $s[] = Linker::linkKnown( |
186 | 183 | $lo, |
187 | 184 | wfMsg( 'logout' ), |
— | — | @@ -196,7 +193,7 @@ |
197 | 194 | ); |
198 | 195 | } |
199 | 196 | |
200 | | - return $wgLang->pipeList( $s ); |
| 197 | + return $this->getSkin()->getLang()->pipeList( $s ); |
201 | 198 | } |
202 | 199 | |
203 | 200 | /** |
— | — | @@ -206,8 +203,6 @@ |
207 | 204 | * @return string |
208 | 205 | */ |
209 | 206 | function quickBar(){ |
210 | | - global $wgOut, $wgUser; |
211 | | - |
212 | 207 | $tns = $this->getSkin()->getTitle()->getNamespace(); |
213 | 208 | |
214 | 209 | $s = "\n<div id='quickbar'>"; |
— | — | @@ -246,7 +241,7 @@ |
247 | 242 | $barnumber++; |
248 | 243 | } |
249 | 244 | |
250 | | - if ( $wgOut->isArticle() ) { |
| 245 | + if ( $this->data['isarticle'] ) { |
251 | 246 | $s .= $this->menuHead( 'qbedit' ); |
252 | 247 | $s .= '<strong>' . $this->editThisPage() . '</strong>'; |
253 | 248 | |
— | — | @@ -255,16 +250,16 @@ |
256 | 251 | wfMsg( 'edithelp' ) |
257 | 252 | ); |
258 | 253 | |
259 | | - if( $wgUser->isLoggedIn() ) { |
| 254 | + if( $this->data['loggedin'] ) { |
260 | 255 | $s .= $sep . $this->moveThisPage(); |
261 | 256 | } |
262 | | - if ( $wgUser->isAllowed( 'delete' ) ) { |
| 257 | + if ( $this->getSkin()->getUser()->isAllowed( 'delete' ) ) { |
263 | 258 | $dtp = $this->deleteThisPage(); |
264 | 259 | if ( $dtp != '' ) { |
265 | 260 | $s .= $sep . $dtp; |
266 | 261 | } |
267 | 262 | } |
268 | | - if ( $wgUser->isAllowed( 'protect' ) ) { |
| 263 | + if ( $this->getSkin()->getUser()->isAllowed( 'protect' ) ) { |
269 | 264 | $ptp = $this->protectThisPage(); |
270 | 265 | if ( $ptp != '' ) { |
271 | 266 | $s .= $sep . $ptp; |
— | — | @@ -276,7 +271,7 @@ |
277 | 272 | $s .= $this->talkLink() |
278 | 273 | . $sep . $this->commentLink() |
279 | 274 | . $sep . $this->printableLink(); |
280 | | - if ( $wgUser->isLoggedIn() ) { |
| 275 | + if ( $this->data['loggedin'] ) { |
281 | 276 | $s .= $sep . $this->watchThisPage(); |
282 | 277 | } |
283 | 278 | |
— | — | @@ -300,20 +295,20 @@ |
301 | 296 | } |
302 | 297 | |
303 | 298 | $s .= $this->menuHead( 'qbmyoptions' ); |
304 | | - if ( $wgUser->isLoggedIn() ) { |
| 299 | + if ( $this->data['loggedin'] ) { |
305 | 300 | $tl = Linker::link( |
306 | | - $wgUser->getTalkPage(), |
| 301 | + $this->getSkin()->getUser()->getTalkPage(), |
307 | 302 | wfMsg( 'mytalk' ), |
308 | 303 | array(), |
309 | 304 | array(), |
310 | 305 | array( 'known', 'noclasses' ) |
311 | 306 | ); |
312 | | - if ( $wgUser->getNewtalk() ) { |
| 307 | + if ( $this->getSkin()->getUser()->getNewtalk() ) { |
313 | 308 | $tl .= ' *'; |
314 | 309 | } |
315 | 310 | |
316 | 311 | $s .= Linker::link( |
317 | | - $wgUser->getUserPage(), |
| 312 | + $this->getSkin()->getUser()->getUserPage(), |
318 | 313 | wfMsg( 'mypage' ), |
319 | 314 | array(), |
320 | 315 | array(), |
— | — | @@ -321,7 +316,7 @@ |
322 | 317 | ) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' ) |
323 | 318 | . $sep . |
324 | 319 | Linker::link( |
325 | | - SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), |
| 320 | + SpecialPage::getSafeTitleFor( 'Contributions', $this->getSkin()->getUser()->getName() ), |
326 | 321 | wfMsg( 'mycontris' ), |
327 | 322 | array(), |
328 | 323 | array(), |
— | — | @@ -336,7 +331,7 @@ |
337 | 332 | . Linker::specialLink( 'Newpages' ) |
338 | 333 | . $sep . Linker::specialLink( 'Listfiles' ) |
339 | 334 | . $sep . Linker::specialLink( 'Statistics' ); |
340 | | - if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { |
| 335 | + if( UploadBase::isEnabled() && UploadBase::isAllowed( $this->getSkin()->getUser() ) === true ) { |
341 | 336 | $s .= $sep . $this->getUploadLink(); |
342 | 337 | } |
343 | 338 | |
— | — | @@ -373,9 +368,9 @@ |
374 | 369 | * @return string |
375 | 370 | */ |
376 | 371 | function searchForm( $label = '' ) { |
377 | | - global $wgRequest, $wgUseTwoButtonsSearchForm; |
| 372 | + global $wgUseTwoButtonsSearchForm; |
378 | 373 | |
379 | | - $search = $wgRequest->getText( 'search' ); |
| 374 | + $search = $this->getSkin()->getRequest()->getText( 'search' ); |
380 | 375 | $action = $this->data['searchaction']; |
381 | 376 | $s = "<form id=\"searchform{$this->searchboxes}\" method=\"get\" class=\"inline\" action=\"$action\">"; |
382 | 377 | if( $label != '' ) { |
Index: trunk/phase3/skins/Standard.php |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | * @return string |
56 | 56 | */ |
57 | 57 | function doAfterContent() { |
58 | | - global $wgContLang, $wgLang; |
| 58 | + global $wgContLang; |
59 | 59 | wfProfileIn( __METHOD__ ); |
60 | 60 | wfProfileIn( __METHOD__ . '-1' ); |
61 | 61 | |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | $s .= "<td class='bottom' align='$l' valign='top'>"; |
80 | 80 | |
81 | 81 | $s .= $this->bottomLinks(); |
82 | | - $s .= "\n<br />" . $wgLang->pipeList( array( |
| 82 | + $s .= "\n<br />" . $this->getSkin()->getLang()->pipeList( array( |
83 | 83 | $this->getSkin()->mainPageLink(), |
84 | 84 | $this->getSkin()->aboutLink(), |
85 | 85 | Linker::specialLink( 'Recentchanges' ), |
— | — | @@ -105,12 +105,12 @@ |
106 | 106 | * @return string |
107 | 107 | */ |
108 | 108 | function quickBar() { |
109 | | - global $wgOut, $wgUser, $wgRequest, $wgContLang; |
| 109 | + global $wgContLang; |
110 | 110 | |
111 | 111 | wfProfileIn( __METHOD__ ); |
112 | 112 | |
113 | | - $action = $wgRequest->getText( 'action' ); |
114 | | - $wpPreview = $wgRequest->getBool( 'wpPreview' ); |
| 113 | + $action = $this->getSkin()->getRequest()->getText( 'action' ); |
| 114 | + $wpPreview = $this->getSkin()->getRequest()->getBool( 'wpPreview' ); |
115 | 115 | $title = $this->getSkin()->getTitle(); |
116 | 116 | $tns = $title->getNamespace(); |
117 | 117 | |
— | — | @@ -138,13 +138,13 @@ |
139 | 139 | } |
140 | 140 | if ( $barnumber == 1 ) { |
141 | 141 | // only show watchlist link if logged in |
142 | | - if( $wgUser->isLoggedIn() ) { |
| 142 | + if( $this->data['loggedin'] ) { |
143 | 143 | $s.= Linker::specialLink( 'Watchlist' ) ; |
144 | 144 | $s .= $sep . Linker::linkKnown( |
145 | 145 | SpecialPage::getTitleFor( 'Contributions' ), |
146 | 146 | wfMsg( 'mycontris' ), |
147 | 147 | array(), |
148 | | - array( 'target' => $wgUser->getName() ) |
| 148 | + array( 'target' => $this->data['username'] ) |
149 | 149 | ); |
150 | 150 | } |
151 | 151 | } |
— | — | @@ -153,8 +153,8 @@ |
154 | 154 | |
155 | 155 | $s .= "\n<hr class='sep' />"; |
156 | 156 | $articleExists = $title->getArticleId(); |
157 | | - if ( $wgOut->isArticle() || $action == 'edit' || $action == 'history' || $wpPreview ) { |
158 | | - if( $wgOut->isArticle() ) { |
| 157 | + if ( $this->data['isarticle'] || $action == 'edit' || $action == 'history' || $wpPreview ) { |
| 158 | + if( $this->data['isarticle'] ) { |
159 | 159 | $s .= '<strong>' . $this->editThisPage() . '</strong>'; |
160 | 160 | } else { # backlink to the article in edit or history mode |
161 | 161 | if( $articleExists ){ # no backlink if no article |
— | — | @@ -212,7 +212,7 @@ |
213 | 213 | } |
214 | 214 | |
215 | 215 | # "Post a comment" link |
216 | | - if( ( $title->isTalkPage() || $wgOut->showNewSectionLink() ) && $action != 'edit' && !$wpPreview ) |
| 216 | + if( ( $title->isTalkPage() || $this->getSkin()->getOutput()->showNewSectionLink() ) && $action != 'edit' && !$wpPreview ) |
217 | 217 | $s .= '<br />' . Linker::link( |
218 | 218 | $title, |
219 | 219 | wfMsg( 'postcomment' ), |
— | — | @@ -229,14 +229,14 @@ |
230 | 230 | article with "Watch this article" checkbox disabled, the article is transparently |
231 | 231 | unwatched. Therefore we do not show the "Watch this page" link in edit mode |
232 | 232 | */ |
233 | | - if ( $wgUser->isLoggedIn() && $articleExists ) { |
| 233 | + if ( $this->data['loggedin'] && $articleExists ) { |
234 | 234 | if( $action != 'edit' && $action != 'submit' ) { |
235 | 235 | $s .= $sep . $this->watchThisPage(); |
236 | 236 | } |
237 | 237 | if ( $title->userCan( 'edit' ) ) |
238 | 238 | $s .= $sep . $this->moveThisPage(); |
239 | 239 | } |
240 | | - if ( $wgUser->isAllowed( 'delete' ) && $articleExists ) { |
| 240 | + if ( $this->getSkin()->getUser()->isAllowed( 'delete' ) && $articleExists ) { |
241 | 241 | $s .= $sep . $this->deleteThisPage() . |
242 | 242 | $sep . $this->protectThisPage(); |
243 | 243 | } |
— | — | @@ -246,7 +246,7 @@ |
247 | 247 | } |
248 | 248 | $s .= $sep . $this->whatLinksHere(); |
249 | 249 | |
250 | | - if( $wgOut->isArticleRelated() ) { |
| 250 | + if( $this->getSkin()->getOutput()->isArticleRelated() ) { |
251 | 251 | $s .= $sep . $this->watchPageLinksLink(); |
252 | 252 | } |
253 | 253 | |
— | — | @@ -268,7 +268,7 @@ |
269 | 269 | $s .= "\n<br /><hr class='sep' />"; |
270 | 270 | } |
271 | 271 | |
272 | | - if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { |
| 272 | + if( UploadBase::isEnabled() && UploadBase::isAllowed( $this->getSkin()->getUser() ) === true ) { |
273 | 273 | $s .= $this->getUploadLink() . $sep; |
274 | 274 | } |
275 | 275 | |
Index: trunk/phase3/skins/Vector.php |
— | — | @@ -26,14 +26,14 @@ |
27 | 27 | * @param $out OutputPage object to initialize |
28 | 28 | */ |
29 | 29 | public function initPage( OutputPage $out ) { |
30 | | - global $wgLocalStylePath, $wgRequest; |
| 30 | + global $wgLocalStylePath; |
31 | 31 | |
32 | 32 | parent::initPage( $out ); |
33 | 33 | |
34 | 34 | // Append CSS which includes IE only behavior fixes for hover support - |
35 | 35 | // this is better than including this in a CSS fille since it doesn't |
36 | 36 | // wait for the CSS file to load before fetching the HTC file. |
37 | | - $min = $wgRequest->getFuzzyBool( 'debug' ) ? '' : '.min'; |
| 37 | + $min = $this->getRequest()->getFuzzyBool( 'debug' ) ? '' : '.min'; |
38 | 38 | $out->addHeadItem( 'csshover', |
39 | 39 | '<!--[if lt IE 7]><style type="text/css">body{behavior:url("' . |
40 | 40 | htmlspecialchars( $wgLocalStylePath ) . |
— | — | @@ -60,29 +60,19 @@ |
61 | 61 | */ |
62 | 62 | class VectorTemplate extends BaseTemplate { |
63 | 63 | |
64 | | - /* Members */ |
65 | | - |
66 | | - /** |
67 | | - * @var Skin Cached skin object |
68 | | - */ |
69 | | - var $skin; |
70 | | - |
71 | 64 | /* Functions */ |
72 | 65 | |
73 | 66 | /** |
74 | 67 | * Outputs the entire contents of the (X)HTML page |
75 | 68 | */ |
76 | 69 | public function execute() { |
77 | | - global $wgLang, $wgVectorUseIconWatch; |
| 70 | + global $wgVectorUseIconWatch; |
78 | 71 | |
79 | | - $this->skin = $this->data['skin']; |
80 | | - |
81 | 72 | // Build additional attributes for navigation urls |
82 | | - //$nav = $this->skin->buildNavigationUrls(); |
83 | 73 | $nav = $this->data['content_navigation']; |
84 | 74 | |
85 | 75 | if ( $wgVectorUseIconWatch ) { |
86 | | - $mode = $this->skin->getTitle()->userIsWatching() ? 'unwatch' : 'watch'; |
| 76 | + $mode = $this->getSkin()->getTitle()->userIsWatching() ? 'unwatch' : 'watch'; |
87 | 77 | if ( isset( $nav['actions'][$mode] ) ) { |
88 | 78 | $nav['views'][$mode] = $nav['actions'][$mode]; |
89 | 79 | $nav['views'][$mode]['class'] = rtrim( 'icon ' . $nav['views'][$mode]['class'], ' ' ); |
— | — | @@ -121,7 +111,7 @@ |
122 | 112 | $this->data['variant_urls'] = $nav['variants']; |
123 | 113 | |
124 | 114 | // Reverse horizontally rendered navigation elements |
125 | | - if ( $wgLang->isRTL() ) { |
| 115 | + if ( $this->data['rtl'] ) { |
126 | 116 | $this->data['view_urls'] = |
127 | 117 | array_reverse( $this->data['view_urls'] ); |
128 | 118 | $this->data['namespace_urls'] = |
— | — | @@ -236,7 +226,7 @@ |
237 | 227 | <?php foreach ( $footericons as $blockName => $footerIcons ): ?> |
238 | 228 | <li id="footer-<?php echo htmlspecialchars( $blockName ); ?>ico"> |
239 | 229 | <?php foreach ( $footerIcons as $icon ): ?> |
240 | | - <?php echo $this->skin->makeFooterIcon( $icon ); ?> |
| 230 | + <?php echo $this->getSkin()->makeFooterIcon( $icon ); ?> |
241 | 231 | |
242 | 232 | <?php endforeach; ?> |
243 | 233 | </li> |
— | — | @@ -336,14 +326,14 @@ |
337 | 327 | * @param $elements array |
338 | 328 | */ |
339 | 329 | private function renderNavigation( $elements ) { |
340 | | - global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser, $wgLang; |
| 330 | + global $wgVectorUseSimpleSearch, $wgVectorShowVariantName; |
341 | 331 | |
342 | 332 | // If only one element was given, wrap it in an array, allowing more |
343 | 333 | // flexible arguments |
344 | 334 | if ( !is_array( $elements ) ) { |
345 | 335 | $elements = array( $elements ); |
346 | 336 | // If there's a series of elements, reverse them when in RTL mode |
347 | | - } elseif ( $wgLang->isRTL() ) { |
| 337 | + } elseif ( $this->data['rtl'] ) { |
348 | 338 | $elements = array_reverse( $elements ); |
349 | 339 | } |
350 | 340 | // Render elements |
— | — | @@ -435,14 +425,14 @@ |
436 | 426 | <h5<?php $this->html( 'userlangattributes' ) ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5> |
437 | 427 | <form action="<?php $this->text( 'wgScript' ) ?>" id="searchform"> |
438 | 428 | <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/> |
439 | | - <?php if ( $wgVectorUseSimpleSearch && $wgUser->getOption( 'vector-simplesearch' ) ): ?> |
| 429 | + <?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ): ?> |
440 | 430 | <div id="simpleSearch"> |
441 | 431 | <?php if ( $this->data['rtl'] ): ?> |
442 | | - <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->skin->getSkinStylePath( 'images/search-rtl.png' ) ) ); ?> |
| 432 | + <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-rtl.png' ) ) ); ?> |
443 | 433 | <?php endif; ?> |
444 | 434 | <?php echo $this->makeSearchInput( array( 'id' => 'searchInput', 'type' => 'text' ) ); ?> |
445 | 435 | <?php if ( !$this->data['rtl'] ): ?> |
446 | | - <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->skin->getSkinStylePath( 'images/search-ltr.png' ) ) ); ?> |
| 436 | + <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-ltr.png' ) ) ); ?> |
447 | 437 | <?php endif; ?> |
448 | 438 | </div> |
449 | 439 | <?php else: ?> |
Index: trunk/phase3/skins/Nostalgia.php |
— | — | @@ -69,13 +69,12 @@ |
70 | 70 | * @return string |
71 | 71 | */ |
72 | 72 | function topLinks() { |
73 | | - global $wgOut, $wgUser; |
74 | 73 | $sep = " |\n"; |
75 | 74 | |
76 | 75 | $s = $this->getSkin()->mainPageLink() . $sep |
77 | 76 | . Linker::specialLink( 'Recentchanges' ); |
78 | 77 | |
79 | | - if ( $wgOut->isArticle() ) { |
| 78 | + if ( $this->data['isarticle'] ) { |
80 | 79 | $s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $sep . $this->talkLink() . |
81 | 80 | $sep . $this->historyLink(); |
82 | 81 | } |
— | — | @@ -83,25 +82,25 @@ |
84 | 83 | /* show links to different language variants */ |
85 | 84 | $s .= $this->variantLinks(); |
86 | 85 | $s .= $this->extensionTabLinks(); |
87 | | - if ( $wgUser->isAnon() ) { |
| 86 | + if ( !$this->data['loggedin'] ) { |
88 | 87 | $s .= $sep . Linker::specialLink( 'Userlogin' ); |
89 | 88 | } else { |
90 | 89 | /* show user page and user talk links */ |
91 | | - $s .= $sep . Linker::link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) ); |
92 | | - $s .= $sep . Linker::link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) ); |
93 | | - if ( $wgUser->getNewtalk() ) { |
| 90 | + $s .= $sep . Linker::link( $this->getSkin()->getUser()->getUserPage(), wfMsgHtml( 'mypage' ) ); |
| 91 | + $s .= $sep . Linker::link( $this->getSkin()->getUser()->getTalkPage(), wfMsgHtml( 'mytalk' ) ); |
| 92 | + if ( $this->getSkin()->getUser()->getNewtalk() ) { |
94 | 93 | $s .= ' *'; |
95 | 94 | } |
96 | 95 | /* show watchlist link */ |
97 | 96 | $s .= $sep . Linker::specialLink( 'Watchlist' ); |
98 | 97 | /* show my contributions link */ |
99 | 98 | $s .= $sep . Linker::link( |
100 | | - SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), |
| 99 | + SpecialPage::getSafeTitleFor( 'Contributions', $this->data['username'] ), |
101 | 100 | wfMsgHtml( 'mycontris' ) ); |
102 | 101 | /* show my preferences link */ |
103 | 102 | $s .= $sep . Linker::specialLink( 'Preferences' ); |
104 | 103 | /* show upload file link */ |
105 | | - if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { |
| 104 | + if( UploadBase::isEnabled() && UploadBase::isAllowed( $this->getSkin()->getUser() ) === true ) { |
106 | 105 | $s .= $sep . $this->getUploadLink(); |
107 | 106 | } |
108 | 107 | |
Index: trunk/phase3/skins/Modern.php |
— | — | @@ -37,10 +37,6 @@ |
38 | 38 | class ModernTemplate extends MonoBookTemplate { |
39 | 39 | |
40 | 40 | /** |
41 | | - * @var Skin |
42 | | - */ |
43 | | - var $skin; |
44 | | - /** |
45 | 41 | * Template filter callback for Modern skin. |
46 | 42 | * Takes an associative array of data set from a SkinTemplate-based |
47 | 43 | * class, and a wrapper for MediaWiki's localization database, and |
— | — | @@ -49,8 +45,6 @@ |
50 | 46 | * @access private |
51 | 47 | */ |
52 | 48 | function execute() { |
53 | | - $this->skin = $skin = $this->data['skin']; |
54 | | - |
55 | 49 | // Suppress warnings to prevent notices about missing indexes in $this->data |
56 | 50 | wfSuppressWarnings(); |
57 | 51 | |
— | — | @@ -137,7 +131,7 @@ |
138 | 132 | <div id="mw_<?php echo htmlspecialchars($blockName); ?>"> |
139 | 133 | <?php |
140 | 134 | foreach ( $footerIcons as $icon ) { ?> |
141 | | - <?php echo $this->skin->makeFooterIcon( $icon, 'withoutImage' ); ?> |
| 135 | + <?php echo $this->getSkin()->makeFooterIcon( $icon, 'withoutImage' ); ?> |
142 | 136 | |
143 | 137 | <?php |
144 | 138 | } ?> |