r86240 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86239‎ | r86240 | r86241 >
Date:21:43, 16 April 2011
Author:happy-melon
Status:ok
Tags:
Comment:
More deprecated calls to Skin static methods, update to use Linker methods instead.
Modified paths:
  • /trunk/phase3/skins/CologneBlue.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/Nostalgia.php (modified) (history)
  • /trunk/phase3/skins/Standard.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/CologneBlue.php
@@ -111,7 +111,7 @@
112112
113113 $s .= $this->bottomLinks();
114114 $s .= $wgLang->pipeList( array(
115 - "\n<br />" . $this->getSkin()->link(
 115+ "\n<br />" . Linker::link(
116116 Title::newMainPage(),
117117 null,
118118 array(),
@@ -150,19 +150,19 @@
151151
152152 $s = array(
153153 $this->getSkin()->mainPageLink(),
154 - $this->getSkin()->linkKnown(
 154+ Linker::linkKnown(
155155 Title::newFromText( wfMsgForContent( 'aboutpage' ) ),
156156 wfMsg( 'about' )
157157 ),
158 - $this->getSkin()->linkKnown(
 158+ Linker::linkKnown(
159159 Title::newFromText( wfMsgForContent( 'helppage' ) ),
160160 wfMsg( 'help' )
161161 ),
162 - $this->getSkin()->linkKnown(
 162+ Linker::linkKnown(
163163 Title::newFromText( wfMsgForContent( 'faqpage' ) ),
164164 wfMsg( 'faq' )
165165 ),
166 - $this->getSkin()->specialLink( 'Specialpages' )
 166+ Linker::specialLink( 'Specialpages' )
167167 );
168168
169169 /* show links to different language variants */
@@ -173,14 +173,14 @@
174174 $s[] = $this->extensionTabLinks();
175175 }
176176 if ( $wgUser->isLoggedIn() ) {
177 - $s[] = $this->getSkin()->linkKnown(
 177+ $s[] = Linker::linkKnown(
178178 $lo,
179179 wfMsg( 'logout' ),
180180 array(),
181181 $q
182182 );
183183 } else {
184 - $s[] = $this->getSkin()->linkKnown(
 184+ $s[] = Linker::linkKnown(
185185 $li,
186186 wfMsg( 'login' ),
187187 array(),
@@ -238,7 +238,7 @@
239239 $s .= $this->menuHead( 'qbedit' );
240240 $s .= '<strong>' . $this->editThisPage() . '</strong>';
241241
242 - $s .= $sep . $this->getSkin()->linkKnown(
 242+ $s .= $sep . Linker::linkKnown(
243243 Title::newFromText( wfMsgForContent( 'edithelppage' ) ),
244244 wfMsg( 'edithelp' )
245245 );
@@ -289,7 +289,7 @@
290290
291291 $s .= $this->menuHead( 'qbmyoptions' );
292292 if ( $wgUser->isLoggedIn() ) {
293 - $tl = $this->getSkin()->link(
 293+ $tl = Linker::link(
294294 $wgUser->getTalkPage(),
295295 wfMsg( 'mytalk' ),
296296 array(),
@@ -300,30 +300,30 @@
301301 $tl .= ' *';
302302 }
303303
304 - $s .= $this->getSkin()->link(
 304+ $s .= Linker::link(
305305 $wgUser->getUserPage(),
306306 wfMsg( 'mypage' ),
307307 array(),
308308 array(),
309309 array( 'known', 'noclasses' )
310 - ) . $sep . $tl . $sep . $this->getSkin()->specialLink( 'Watchlist' )
 310+ ) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' )
311311 . $sep .
312 - $this->getSkin()->link(
 312+ Linker::link(
313313 SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ),
314314 wfMsg( 'mycontris' ),
315315 array(),
316316 array(),
317317 array( 'known', 'noclasses' )
318 - ) . $sep . $this->getSkin()->specialLink( 'Preferences' )
319 - . $sep . $this->getSkin()->specialLink( 'Userlogout' );
 318+ ) . $sep . Linker::specialLink( 'Preferences' )
 319+ . $sep . Linker::specialLink( 'Userlogout' );
320320 } else {
321 - $s .= $this->getSkin()->specialLink( 'Userlogin' );
 321+ $s .= Linker::specialLink( 'Userlogin' );
322322 }
323323
324324 $s .= $this->menuHead( 'qbspecialpages' )
325 - . $this->getSkin()->specialLink( 'Newpages' )
326 - . $sep . $this->getSkin()->specialLink( 'Listfiles' )
327 - . $sep . $this->getSkin()->specialLink( 'Statistics' );
 325+ . Linker::specialLink( 'Newpages' )
 326+ . $sep . Linker::specialLink( 'Listfiles' )
 327+ . $sep . Linker::specialLink( 'Statistics' );
328328 if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) {
329329 $s .= $sep . $this->getUploadLink();
330330 }
@@ -335,7 +335,7 @@
336336 . wfMsg( 'sitesupport' ) . '</a>';
337337 }
338338
339 - $s .= $sep . $this->getSkin()->link(
 339+ $s .= $sep . Linker::link(
340340 SpecialPage::getTitleFor( 'Specialpages' ),
341341 wfMsg( 'moredotdotdot' ),
342342 array(),
Index: trunk/phase3/skins/Standard.php
@@ -79,7 +79,7 @@
8080 $s .= "\n<br />" . $wgLang->pipeList( array(
8181 $this->getSkin()->mainPageLink(),
8282 $this->getSkin()->aboutLink(),
83 - $this->getSkin()->specialLink( 'Recentchanges' ),
 83+ Linker::specialLink( 'Recentchanges' ),
8484 $this->searchForm() ) )
8585 . '<br /><span id="pagestats">' . $this->pageStats() . '</span>';
8686
@@ -133,8 +133,8 @@
134134 if ( $barnumber == 1 ) {
135135 // only show watchlist link if logged in
136136 if( $wgUser->isLoggedIn() ) {
137 - $s.= $this->getSkin()->specialLink( 'Watchlist' ) ;
138 - $s .= $sep . $this->getSkin()->linkKnown(
 137+ $s.= Linker::specialLink( 'Watchlist' ) ;
 138+ $s .= $sep . Linker::linkKnown(
139139 SpecialPage::getTitleFor( 'Contributions' ),
140140 wfMsg( 'mycontris' ),
141141 array(),
@@ -197,10 +197,7 @@
198198 $link = $nstext . ':' . $link;
199199 }
200200
201 - $s .= $this->getSkin()->link(
202 - Title::newFromText( $link ),
203 - $text
204 - );
 201+ $s .= Linker::link( Title::newFromText( $link ), $text );
205202 } elseif( $this->getSkin()->getTitle()->getNamespace() != NS_SPECIAL ) {
206203 # we just throw in a "New page" text to tell the user that he's in edit mode,
207204 # and to avoid messing with the separator that is prepended to the next item
@@ -270,7 +267,7 @@
271268 $s .= $this->getUploadLink() . $sep;
272269 }
273270
274 - $s .= $this->getSkin()->specialLink( 'Specialpages' );
 271+ $s .= Linker::specialLink( 'Specialpages' );
275272
276273 global $wgSiteSupportPage;
277274 if( $wgSiteSupportPage ) {
Index: trunk/phase3/skins/Vector.php
@@ -106,10 +106,10 @@
107107 }
108108 if ( isset($link['tooltiponly']) && $link['tooltiponly'] ) {
109109 $nav[$section][$key]['key'] =
110 - $this->skin->tooltip( $xmlID );
 110+ Linker::tooltip( $xmlID );
111111 } else {
112112 $nav[$section][$key]['key'] =
113 - $this->skin->tooltipAndAccesskey( $xmlID );
 113+ Linker::tooltipAndAccesskey( $xmlID );
114114 }
115115 }
116116 }
@@ -204,7 +204,7 @@
205205 <!-- panel -->
206206 <div id="mw-panel" class="noprint">
207207 <!-- logo -->
208 - <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo $this->skin->tooltipAndAccesskey( 'p-logo' ) ?>></a></div>
 208+ <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Linker::tooltipAndAccesskey( 'p-logo' ) ?>></a></div>
209209 <!-- /logo -->
210210 <?php $this->renderPortals( $this->data['sidebar'] ); ?>
211211 </div>
@@ -279,7 +279,7 @@
280280 $msg = $name;
281281 }
282282 ?>
283 -<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo $this->skin->tooltip( 'p-' . $name ) ?>>
 283+<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?>>
284284 <h5<?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $msg ); if ( wfEmptyMsg( $msg ) ) echo htmlspecialchars( $msg ); else echo htmlspecialchars( $out ); ?></h5>
285285 <div class="body">
286286 <?php
Index: trunk/phase3/skins/Nostalgia.php
@@ -64,7 +64,7 @@
6565 $sep = " |\n";
6666
6767 $s = $this->getSkin()->mainPageLink() . $sep
68 - . $this->getSkin()->specialLink( 'Recentchanges' );
 68+ . Linker::specialLink( 'Recentchanges' );
6969
7070 if ( $wgOut->isArticle() ) {
7171 $s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $sep . $this->talkLink() .
@@ -75,22 +75,22 @@
7676 $s .= $this->variantLinks();
7777 $s .= $this->extensionTabLinks();
7878 if ( $wgUser->isAnon() ) {
79 - $s .= $sep . $this->getSkin()->specialLink( 'Userlogin' );
 79+ $s .= $sep . Linker::specialLink( 'Userlogin' );
8080 } else {
8181 /* show user page and user talk links */
82 - $s .= $sep . $this->getSkin()->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
83 - $s .= $sep . $this->getSkin()->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
 82+ $s .= $sep . Linker::link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
 83+ $s .= $sep . Linker::link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
8484 if ( $wgUser->getNewtalk() ) {
8585 $s .= ' *';
8686 }
8787 /* show watchlist link */
88 - $s .= $sep . $this->getSkin()->specialLink( 'Watchlist' );
 88+ $s .= $sep . Linker::specialLink( 'Watchlist' );
8989 /* show my contributions link */
90 - $s .= $sep . $this->getSkin()->link(
 90+ $s .= $sep . Linker::link(
9191 SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ),
9292 wfMsgHtml( 'mycontris' ) );
9393 /* show my preferences link */
94 - $s .= $sep . $this->getSkin()->specialLink( 'Preferences' );
 94+ $s .= $sep . Linker::specialLink( 'Preferences' );
9595 /* show upload file link */
9696 if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) {
9797 $s .= $sep . $this->getUploadLink();
Index: trunk/phase3/skins/MonoBook.php
@@ -112,7 +112,7 @@
113113 </div>
114114 <div class="portlet" id="p-logo">
115115 <?php
116 - $logoAttribs = array() + $skin->tooltipAndAccesskeyAttribs('p-logo');
 116+ $logoAttribs = array() + Linker::tooltipAndAccesskeyAttribs('p-logo');
117117 $logoAttribs['style'] = "background-image: url({$this->data['logopath']});";
118118 $logoAttribs['href'] = $this->data['nav_urls']['mainpage']['href'];
119119 echo Html::element( 'a', $logoAttribs );
@@ -212,12 +212,12 @@
213213 $linkAttribs = array( 'href' => $tab['href'] );
214214
215215 if( isset( $tab["tooltiponly"] ) && $tab["tooltiponly"] ) {
216 - $title = $skin->titleAttrib( "ca-$key" );
 216+ $title = Linker::titleAttrib( "ca-$key" );
217217 if ( $title !== false ) {
218218 $linkAttribs['title'] = $title;
219219 }
220220 } else {
221 - $linkAttribs += $skin->tooltipAndAccesskeyAttribs( "ca-$key" );
 221+ $linkAttribs += Linker::tooltipAndAccesskeyAttribs( "ca-$key" );
222222 }
223223 $linkHtml = Html::element( 'a', $linkAttribs, $tab['text'] );
224224
@@ -279,7 +279,7 @@
280280 /*************************************************************************************************/
281281 function customBox( $bar, $cont ) {
282282 $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
283 - $tooltip = $this->skin->titleAttrib( "p-$bar" );
 283+ $tooltip = Linker::titleAttrib( "p-$bar" );
284284 if ( $tooltip !== false ) {
285285 $portletAttribs['title'] = $tooltip;
286286 }

Status & tagging log