More deprecated calls to Skin static methods, update to use Linker methods instead.
authorHappy-melon <happy-melon@users.mediawiki.org>
Sat, 16 Apr 2011 21:43:32 +0000 (21:43 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Sat, 16 Apr 2011 21:43:32 +0000 (21:43 +0000)
skins/CologneBlue.php
skins/MonoBook.php
skins/Nostalgia.php
skins/Standard.php
skins/Vector.php

index 6dd3137..b9745a5 100644 (file)
@@ -111,7 +111,7 @@ class CologneBlueTemplate extends LegacyTemplate {
 
                $s .= $this->bottomLinks();
                $s .= $wgLang->pipeList( array(
-                       "\n<br />" . $this->getSkin()->link(
+                       "\n<br />" . Linker::link(
                                Title::newMainPage(),
                                null,
                                array(),
@@ -150,19 +150,19 @@ class CologneBlueTemplate extends LegacyTemplate {
 
                $s = array(
                        $this->getSkin()->mainPageLink(),
-                       $this->getSkin()->linkKnown(
+                       Linker::linkKnown(
                                Title::newFromText( wfMsgForContent( 'aboutpage' ) ),
                                wfMsg( 'about' )
                        ),
-                       $this->getSkin()->linkKnown(
+                       Linker::linkKnown(
                                Title::newFromText( wfMsgForContent( 'helppage' ) ),
                                wfMsg( 'help' )
                        ),
-                       $this->getSkin()->linkKnown(
+                       Linker::linkKnown(
                                Title::newFromText( wfMsgForContent( 'faqpage' ) ),
                                wfMsg( 'faq' )
                        ),
-                       $this->getSkin()->specialLink( 'Specialpages' )
+                       Linker::specialLink( 'Specialpages' )
                );
 
                /* show links to different language variants */
@@ -173,14 +173,14 @@ class CologneBlueTemplate extends LegacyTemplate {
                        $s[] = $this->extensionTabLinks();
                }
                if ( $wgUser->isLoggedIn() ) {
-                       $s[] = $this->getSkin()->linkKnown(
+                       $s[] = Linker::linkKnown(
                                $lo,
                                wfMsg( 'logout' ),
                                array(),
                                $q
                        );
                } else {
-                       $s[] = $this->getSkin()->linkKnown(
+                       $s[] = Linker::linkKnown(
                                $li,
                                wfMsg( 'login' ),
                                array(),
@@ -238,7 +238,7 @@ class CologneBlueTemplate extends LegacyTemplate {
                        $s .= $this->menuHead( 'qbedit' );
                        $s .= '<strong>' . $this->editThisPage() . '</strong>';
 
-                       $s .= $sep . $this->getSkin()->linkKnown(
+                       $s .= $sep . Linker::linkKnown(
                                Title::newFromText( wfMsgForContent( 'edithelppage' ) ),
                                wfMsg( 'edithelp' )
                        );
@@ -289,7 +289,7 @@ class CologneBlueTemplate extends LegacyTemplate {
 
                $s .= $this->menuHead( 'qbmyoptions' );
                if ( $wgUser->isLoggedIn() ) {
-                       $tl = $this->getSkin()->link(
+                       $tl = Linker::link(
                                $wgUser->getTalkPage(),
                                wfMsg( 'mytalk' ),
                                array(),
@@ -300,30 +300,30 @@ class CologneBlueTemplate extends LegacyTemplate {
                                $tl .= ' *';
                        }
 
-                       $s .= $this->getSkin()->link(
+                       $s .= Linker::link(
                                        $wgUser->getUserPage(),
                                        wfMsg( 'mypage' ),
                                        array(),
                                        array(),
                                        array( 'known', 'noclasses' )
-                               ) . $sep . $tl . $sep . $this->getSkin()->specialLink( 'Watchlist' )
+                               ) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' )
                                        . $sep .
-                               $this->getSkin()->link(
+                               Linker::link(
                                        SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ),
                                        wfMsg( 'mycontris' ),
                                        array(),
                                        array(),
                                        array( 'known', 'noclasses' )
-                               ) . $sep . $this->getSkin()->specialLink( 'Preferences' )
-                               . $sep . $this->getSkin()->specialLink( 'Userlogout' );
+                               ) . $sep . Linker::specialLink( 'Preferences' )
+                               . $sep . Linker::specialLink( 'Userlogout' );
                } else {
-                       $s .= $this->getSkin()->specialLink( 'Userlogin' );
+                       $s .= Linker::specialLink( 'Userlogin' );
                }
 
                $s .= $this->menuHead( 'qbspecialpages' )
-                       . $this->getSkin()->specialLink( 'Newpages' )
-                       . $sep . $this->getSkin()->specialLink( 'Listfiles' )
-                       . $sep . $this->getSkin()->specialLink( 'Statistics' );
+                       . Linker::specialLink( 'Newpages' )
+                       . $sep . Linker::specialLink( 'Listfiles' )
+                       . $sep . Linker::specialLink( 'Statistics' );
                if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) {
                        $s .= $sep . $this->getUploadLink();
                }
@@ -335,7 +335,7 @@ class CologneBlueTemplate extends LegacyTemplate {
                                        . wfMsg( 'sitesupport' ) . '</a>';
                }
 
-               $s .= $sep . $this->getSkin()->link(
+               $s .= $sep . Linker::link(
                        SpecialPage::getTitleFor( 'Specialpages' ),
                        wfMsg( 'moredotdotdot' ),
                        array(),
index 018a810..20067a9 100644 (file)
@@ -112,7 +112,7 @@ class MonoBookTemplate extends BaseTemplate {
        </div>
        <div class="portlet" id="p-logo">
                <?php
-                       $logoAttribs = array() + $skin->tooltipAndAccesskeyAttribs('p-logo');
+                       $logoAttribs = array() + Linker::tooltipAndAccesskeyAttribs('p-logo');
                        $logoAttribs['style'] = "background-image: url({$this->data['logopath']});";
                        $logoAttribs['href'] = $this->data['nav_urls']['mainpage']['href'];
                        echo Html::element( 'a', $logoAttribs );
@@ -212,12 +212,12 @@ class MonoBookTemplate extends BaseTemplate {
                                        $linkAttribs = array( 'href' => $tab['href'] );
                                        
                                        if( isset( $tab["tooltiponly"] ) && $tab["tooltiponly"] ) {
-                                               $title = $skin->titleAttrib( "ca-$key" );
+                                               $title = Linker::titleAttrib( "ca-$key" );
                                                if ( $title !== false ) {
                                                        $linkAttribs['title'] = $title;
                                                }
                                        } else {
-                                               $linkAttribs += $skin->tooltipAndAccesskeyAttribs( "ca-$key" );
+                                               $linkAttribs += Linker::tooltipAndAccesskeyAttribs( "ca-$key" );
                                        }
                                        $linkHtml = Html::element( 'a', $linkAttribs, $tab['text'] );
                                        
@@ -279,7 +279,7 @@ class MonoBookTemplate extends BaseTemplate {
        /*************************************************************************************************/
        function customBox( $bar, $cont ) {
                $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
-               $tooltip = $this->skin->titleAttrib( "p-$bar" );
+               $tooltip = Linker::titleAttrib( "p-$bar" );
                if ( $tooltip !== false ) {
                        $portletAttribs['title'] = $tooltip;
                }
index 9e89787..597cd23 100644 (file)
@@ -64,7 +64,7 @@ class NostalgiaTemplate extends LegacyTemplate {
                $sep = " |\n";
 
                $s = $this->getSkin()->mainPageLink() . $sep
-                 . $this->getSkin()->specialLink( 'Recentchanges' );
+                 . Linker::specialLink( 'Recentchanges' );
 
                if ( $wgOut->isArticle() ) {
                        $s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $sep . $this->talkLink() .
@@ -75,22 +75,22 @@ class NostalgiaTemplate extends LegacyTemplate {
                $s .= $this->variantLinks();
                $s .= $this->extensionTabLinks();
                if ( $wgUser->isAnon() ) {
-                       $s .= $sep . $this->getSkin()->specialLink( 'Userlogin' );
+                       $s .= $sep . Linker::specialLink( 'Userlogin' );
                } else {
                        /* show user page and user talk links */
-                       $s .= $sep . $this->getSkin()->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
-                       $s .= $sep . $this->getSkin()->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
+                       $s .= $sep . Linker::link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
+                       $s .= $sep . Linker::link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
                        if ( $wgUser->getNewtalk() ) {
                                $s .= ' *';
                        }
                        /* show watchlist link */
-                       $s .= $sep . $this->getSkin()->specialLink( 'Watchlist' );
+                       $s .= $sep . Linker::specialLink( 'Watchlist' );
                        /* show my contributions link */
-                       $s .= $sep . $this->getSkin()->link(
+                       $s .= $sep . Linker::link(
                                SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ),
                                wfMsgHtml( 'mycontris' ) );
                        /* show my preferences link */
-                       $s .= $sep . $this->getSkin()->specialLink( 'Preferences' );
+                       $s .= $sep . Linker::specialLink( 'Preferences' );
                        /* show upload file link */
                        if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) {
                                $s .= $sep . $this->getUploadLink();
index 908d462..bb540ae 100644 (file)
@@ -79,7 +79,7 @@ class StandardTemplate extends LegacyTemplate {
                $s .= "\n<br />" . $wgLang->pipeList( array(
                        $this->getSkin()->mainPageLink(),
                        $this->getSkin()->aboutLink(),
-                       $this->getSkin()->specialLink( 'Recentchanges' ),
+                       Linker::specialLink( 'Recentchanges' ),
                        $this->searchForm() ) )
                        . '<br /><span id="pagestats">' . $this->pageStats() . '</span>';
 
@@ -133,8 +133,8 @@ class StandardTemplate extends LegacyTemplate {
                        if ( $barnumber == 1 ) {
                                // only show watchlist link if logged in
                                if( $wgUser->isLoggedIn() ) {
-                                       $s.= $this->getSkin()->specialLink( 'Watchlist' ) ;
-                                       $s .= $sep . $this->getSkin()->linkKnown(
+                                       $s.= Linker::specialLink( 'Watchlist' ) ;
+                                       $s .= $sep . Linker::linkKnown(
                                                SpecialPage::getTitleFor( 'Contributions' ),
                                                wfMsg( 'mycontris' ),
                                                array(),
@@ -197,10 +197,7 @@ class StandardTemplate extends LegacyTemplate {
                                                $link = $nstext . ':' . $link;
                                        }
 
-                                       $s .= $this->getSkin()->link(
-                                               Title::newFromText( $link ),
-                                               $text
-                                       );
+                                       $s .= Linker::link( Title::newFromText( $link ), $text );
                                } elseif( $this->getSkin()->getTitle()->getNamespace() != NS_SPECIAL ) {
                                        # we just throw in a "New page" text to tell the user that he's in edit mode,
                                        # and to avoid messing with the separator that is prepended to the next item
@@ -270,7 +267,7 @@ class StandardTemplate extends LegacyTemplate {
                        $s .= $this->getUploadLink() . $sep;
                }
 
-               $s .= $this->getSkin()->specialLink( 'Specialpages' );
+               $s .= Linker::specialLink( 'Specialpages' );
 
                global $wgSiteSupportPage;
                if( $wgSiteSupportPage ) {
index 6afd587..b14dba0 100644 (file)
@@ -106,10 +106,10 @@ class VectorTemplate extends BaseTemplate {
                                }
                                if ( isset($link['tooltiponly']) && $link['tooltiponly'] ) {
                                        $nav[$section][$key]['key'] =
-                                               $this->skin->tooltip( $xmlID );
+                                               Linker::tooltip( $xmlID );
                                } else {
                                        $nav[$section][$key]['key'] =
-                                               $this->skin->tooltipAndAccesskey( $xmlID );
+                                               Linker::tooltipAndAccesskey( $xmlID );
                                }
                        }
                }
@@ -204,7 +204,7 @@ class VectorTemplate extends BaseTemplate {
                <!-- panel -->
                        <div id="mw-panel" class="noprint">
                                <!-- logo -->
-                                       <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>
+                                       <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>
                                <!-- /logo -->
                                <?php $this->renderPortals( $this->data['sidebar'] ); ?>
                        </div>
@@ -279,7 +279,7 @@ class VectorTemplate extends BaseTemplate {
                        $msg = $name;
                }
                ?>
-<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo $this->skin->tooltip( 'p-' . $name ) ?>>
+<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?>>
        <h5<?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $msg ); if ( wfEmptyMsg( $msg ) ) echo htmlspecialchars( $msg ); else echo htmlspecialchars( $out ); ?></h5>
        <div class="body">
 <?php