Reverting for now this undiscussed and problematic change:

* Now sorting interwiki links by iw_prefix and avoiding duplicates
This commit is contained in:
Brion Vibber 2005-07-24 08:06:56 +00:00
parent c91ebd9d90
commit f7de33dc2c
3 changed files with 1 additions and 22 deletions

View 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.

View 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;
}
}
}

View 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),