Followup r88118. Fix Bug 28979 — “remove some CSS for abbr and acronym
[lhc/web/wiklou.git] / skins / Standard.php
index fb54621..41a796b 100644 (file)
@@ -18,9 +18,6 @@ class SkinStandard extends SkinLegacy {
        var $skinname = 'standard', $stylename = 'standard',
                $template = 'StandardTemplate';
 
-       /**
-        *
-        */
        function setupSkinUserCss( OutputPage $out ){
                parent::setupSkinUserCss( $out );
                $out->AddModuleStyles( 'skins.standard' );
@@ -82,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>';
 
@@ -121,25 +118,33 @@ class StandardTemplate extends LegacyTemplate {
                unset( $bar['SEARCH'] );
                unset( $bar['LANGUAGES'] );
                unset( $bar['TOOLBOX'] );
-               $browseLinks = reset( $bar );
 
-               foreach ( $browseLinks as $link ) {
-                       if ( $link['text'] != '-' ) {
-                               $s .= "<a href=\"{$link['href']}\">" .
-                                       htmlspecialchars( $link['text'] ) . '</a>' . $sep;
+               $barnumber = 1;
+               foreach ( $bar as $browseLinks ) {
+                       if ( $barnumber > 1 ) {
+                               $s .= "\n<hr class='sep' />";
+                       } 
+                       foreach ( $browseLinks as $link ) {
+                               if ( $link['text'] != '-' ) {
+                                       $s .= "<a href=\"{$link['href']}\">" .
+                                               htmlspecialchars( $link['text'] ) . '</a>' . $sep;
+                               }
+                       }
+                       if ( $barnumber == 1 ) {
+                               // only show watchlist link if logged in
+                               if( $wgUser->isLoggedIn() ) {
+                                       $s.= Linker::specialLink( 'Watchlist' ) ;
+                                       $s .= $sep . Linker::linkKnown(
+                                               SpecialPage::getTitleFor( 'Contributions' ),
+                                               wfMsg( 'mycontris' ),
+                                               array(),
+                                               array( 'target' => $wgUser->getName() )
+                                       );
+                               }
                        }
+                       $barnumber = $barnumber + 1;
                }
 
-               if( $wgUser->isLoggedIn() ) {
-                       $s.= $this->getSkin()->specialLink( 'Watchlist' ) ;
-                       $s .= $sep . $this->getSkin()->linkKnown(
-                               SpecialPage::getTitleFor( 'Contributions' ),
-                               wfMsg( 'mycontris' ),
-                               array(),
-                               array( 'target' => $wgUser->getName() )
-                       );
-               }
-               // only show watchlist link if logged in
                $s .= "\n<hr class='sep' />";
                $articleExists = $this->getSkin()->getTitle()->getArticleId();
                if ( $wgOut->isArticle() || $action == 'edit' || $action == 'history' || $wpPreview ) {
@@ -192,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
@@ -254,7 +256,7 @@ class StandardTemplate extends LegacyTemplate {
                                if( $id || $ip ){
                                        $s .= $sep . $this->userContribsLink();
                                }
-                               if( $this->showEmailUser( $id ) ) {
+                               if( $this->getSkin()->showEmailUser( $id ) ) {
                                        $s .= $sep . $this->emailUserLink();
                                }
                        }
@@ -265,7 +267,7 @@ class StandardTemplate extends LegacyTemplate {
                        $s .= $this->getUploadLink() . $sep;
                }
 
-               $s .= $this->getSkin()->specialLink( 'Specialpages' );
+               $s .= Linker::specialLink( 'Specialpages' );
 
                global $wgSiteSupportPage;
                if( $wgSiteSupportPage ) {