Clean up old way to disable variants (using a special name 'disable')
authorLiangent <liangent@gmail.com>
Wed, 17 Apr 2013 04:01:16 +0000 (12:01 +0800)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 17 Apr 2013 08:19:17 +0000 (08:19 +0000)
$wgDisabledVariants is the preferred setting now since 1.16. For some
reason, the 'disable' magic name hasn't been cleaned up completely and
only affects skinning.

Someone may want to run rebuildLanguage.php later because messages.inc
is modified here. I didn't run it because it introduces too many
unrelated edits messing up this patch.

Change-Id: Ifb005e7cc9efd0b4a4f87fd491a71c8d5e1a5748

includes/SkinLegacy.php
includes/SkinTemplate.php
maintenance/language/messages.inc

index 9d657f7..ca49024 100644 (file)
@@ -218,9 +218,6 @@ class LegacyTemplate extends BaseTemplate {
                        foreach ( $variants as $code ) {
                                $varname = $lang->getVariantname( $code );
 
-                               if ( $varname == 'disable' ) {
-                                       continue;
-                               }
                                $s = $wgLang->pipeList( array(
                                        $s,
                                        '<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '" hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
index 9014c7f..17ec88a 100644 (file)
@@ -1021,11 +1021,6 @@ class SkinTemplate extends Skin {
                                        foreach( $variants as $code ) {
                                                // Gets variant name from language code
                                                $varname = $pageLang->getVariantname( $code );
-                                               // Checks if the variant is marked as disabled
-                                               if( $varname == 'disable' ) {
-                                                       // Skips this variant
-                                                       continue;
-                                               }
                                                // Appends variant link
                                                $content_navigation['variants'][] = array(
                                                        'class' => ( $code == $preferred ) ? 'selected' : false,
index b7ad695..39083f9 100644 (file)
@@ -3975,8 +3975,6 @@ XHTML id names.",
        'video-info'          => 'Video information, used by Language::formatTimePeriod() to format lengths in the above messages',
        'badimagelist'        => 'Bad image list',
        'variantname-zh'      => "Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
 Variants for Chinese language",
        'variantname-gan'      => 'Variants for Gan language',
        'variantname-sr'      => 'Variants for Serbian language',