Reverting for now this undiscussed and problematic change:
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 24 Jul 2005 08:06:56 +0000 (08:06 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 24 Jul 2005 08:06:56 +0000 (08:06 +0000)
* Now sorting interwiki links by iw_prefix and avoiding duplicates

RELEASE-NOTES
includes/Skin.php
includes/SkinTemplate.php

index d6318ea..d7cd826 100644 (file)
@@ -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 <pre> 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.
index 712a216..929df08 100644 (file)
@@ -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;
-       }
 }
 
 }
index 5ea7c37..0cd2963 100644 (file)
@@ -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),