From: Brion Vibber Date: Sun, 24 Jul 2005 08:06:56 +0000 (+0000) Subject: Reverting for now this undiscussed and problematic change: X-Git-Tag: 1.5.0beta4~43 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;h=f7de33dc2cd3463fc8f57b14f0e419f797a9329a;p=lhc%2Fweb%2Fwiklou.git Reverting for now this undiscussed and problematic change: * Now sorting interwiki links by iw_prefix and avoiding duplicates --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d6318ea222..d7cd82634c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -594,7 +594,6 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. example of this. * (bug 740) Messages from extensions now appear in Special:Allmessages * (bug 2857) fixed parsing of lists in
 sections
-* Now sorting interwiki links by iw_prefix and avoiding duplicates
 * (bug 796) Trackback support
 * Fix 1.5 regression: weird, backwards diff links on new pages in enhanced RC
   are now suppressed as before.
diff --git a/includes/Skin.php b/includes/Skin.php
index 712a216573..929df08c4a 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -1131,7 +1131,6 @@ END;
 		}
 
 		$a = $wgOut->getLanguageLinks();
-		$a = $this->sortInterwikiLinks( $a );
 		if ( 0 == count( $a ) ) {
 			return '';
 		}
@@ -1329,23 +1328,6 @@ END;
 		wfProfileOut( $fname );
 		return $bar;
 	}
-
-	function sortInterwikiLinks( $links ) {
-		$nlinks = $nnlinks = array();
-		
-		foreach($links as $link) {
-			list($iso, $url) = explode( ':', $link, 2 );
-			$nlinks[$iso] = $url;
-		}
-		
-		ksort( $nlinks );
-
-		foreach($nlinks as $k => $v) {
-			$nnlinks[] = implode( ':', array($k, $v) );
-		}
-
-		return $nnlinks;
-	}
 }
 
 }
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index 5ea7c37dfe..0cd2963658 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -361,9 +361,7 @@ class SkinTemplate extends Skin {
 		$language_urls = array();
 
 		if ( !$wgHideInterlanguageLinks ) {
-			$iwlinks = $wgOut->getLanguageLinks();
-			$iwlinks = $this->sortInterwikiLinks( $iwlinks );
-			foreach( $iwlinks as $l ) {
+			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),