Refactor out common variant list code from Skin.php and CologneBlue.php into Skin::variantLinks, and add it to Nostalgia's topLinks()
messages as optional for localisation.
* Fix user_newpass upgrade for prefixed tables (reported by Fyren)
* (bug 7636) Fix typo in Firefox 2 check (tested by Werdna)
+* (bug 7663) Include language variant switcher links on Nostalgia skin
== Languages updated ==
}
# Many people don't like this dropdown box
#$s .= $sep . $this->specialPagesList();
+
+ $s .= $this->variantLinks();
+ return $s;
+ }
+
+ /**
+ * Language/charset variant links for classic-style skins
+ * @return string
+ */
+ function variantLinks() {
+ $s = '';
/* show links to different language variants */
global $wgDisableLangConversion, $wgContLang, $wgTitle;
$variants = $wgContLang->getVariants();
$varname = $wgContLang->getVariantname( $code );
if( $varname == 'disable' )
continue;
- $s .= ' | <a href="' . $wgTitle->getLocalUrl( 'variant=' . $code ) . '">' . $varname . '</a>';
+ $s .= ' | <a href="' . $wgTitle->escapeLocalUrl( 'variant=' . $code ) . '">' . htmlspecialchars( $varname ) . '</a>';
}
}
-
return $s;
}
}
/* show links to different language variants */
- global $wgDisableLangConversion;
- $variants = $wgContLang->getVariants();
- if( !$wgDisableLangConversion && sizeof( $variants ) > 1 ) {
- $actstr = '';
- foreach( $variants as $code ) {
- $varname = $wgContLang->getVariantname( $code );
- if( $varname == 'disable' )
- continue;
- $s .= ' | <a href="' . $wgTitle->getLocalUrl( 'variant=' . $code ) . '">' . $varname . '</a>';
- }
- }
+ $s .= $this->variantLinks();
return $s;
}
} else {
$s .= $sep . $this->specialLink( "userlogout" );
}
+
+ /* show links to different language variants */
+ $s .= $this->variantLinks();
+
$s .= $sep . $this->specialPagesList();
return $s;