introduced $wgHideInterlanguageLinks, needed for dumpHTML
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 28 May 2005 06:56:30 +0000 (06:56 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 28 May 2005 06:56:30 +0000 (06:56 +0000)
includes/DefaultSettings.php
includes/Skin.php
includes/SkinTemplate.php

index 3d94ca5..e2d361d 100644 (file)
@@ -465,6 +465,10 @@ $wgLanguageCode     = 'en';
 /** Treat language links as magic connectors, not inline links */
 $wgInterwikiMagic      = true;
 
+/** Hide interlanguage links from the sidebar */
+$wgHideInterlanguageLinks = false;
+
+
 /** We speak UTF-8 all the time now, unless some oddities happen */
 $wgInputEncoding       = 'UTF-8';
 $wgOutputEncoding      = 'UTF-8'; 
index d717a68..bdd40ca 100644 (file)
@@ -1119,7 +1119,11 @@ END;
        }
 
        function otherLanguages() {
-               global $wgOut, $wgContLang, $wgTitle;
+               global $wgOut, $wgContLang, $wgTitle, $wgHideInterlanguageLinks;
+
+               if ( $wgHideInterlanguageLinks ) {
+                       return '';
+               }
 
                $a = $wgOut->getLanguageLinks();
                if ( 0 == count( $a ) ) {
index eae160d..d5f4c2b 100644 (file)
@@ -146,7 +146,7 @@ class SkinTemplate extends Skin {
                global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgContLang, $wgOut;
                global $wgScript, $wgStylePath, $wgLanguageCode, $wgContLanguageCode, $wgUseNewInterlanguage;
                global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
-               global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses;
+               global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgHideInterlanguageLinks;
                global $wgMaxCredits, $wgShowCreditsIfMax;
                global $wgPageShowWatchingUsers;
 
@@ -310,7 +310,6 @@ class SkinTemplate extends Skin {
                                $tpl->set('numberofwatchingusers', false);
                        }
 
-                       $tpl->set('lastmod', $this->lastModified());
                        $tpl->set('copyright',$this->getCopyright());
 
                        $this->credits = false;
@@ -318,6 +317,8 @@ class SkinTemplate extends Skin {
                        if (isset($wgMaxCredits) && $wgMaxCredits != 0) {
                                require_once("Credits.php");
                                $this->credits = getCredits($wgArticle, $wgMaxCredits, $wgShowCreditsIfMax);
+                       } else {
+                               $tpl->set('lastmod', $this->lastModified());
                        }
 
                        $tpl->setRef( 'credits', $this->credits );
@@ -353,11 +354,14 @@ class SkinTemplate extends Skin {
 
                # Language links
                $language_urls = array();
-               foreach( $wgOut->getLanguageLinks() as $l ) {
-                       $nt = Title::newFromText( $l );
-                       $language_urls[] = array('href' => $nt->getFullURL(),
-                       'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l),
-                       'class' => $wgContLang->isRTL() ? 'rtl' : 'ltr');
+               
+               if ( !$wgHideInterlanguageLinks ) {
+                       foreach( $wgOut->getLanguageLinks() as $l ) {
+                               $nt = Title::newFromText( $l );
+                               $language_urls[] = array('href' => $nt->getFullURL(),
+                               'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l),
+                               'class' => $wgContLang->isRTL() ? 'rtl' : 'ltr');
+                       }
                }
                if(count($language_urls)) {
                        $tpl->setRef( 'language_urls', $language_urls);