Index: trunk/extensions/Narayam/Narayam.hooks.php |
— | — | @@ -42,14 +42,20 @@ |
43 | 43 | |
44 | 44 | $vars['wgNarayamAvailableSchemes'] = self::getSchemes(); // Note: scheme names must be keys, not values |
45 | 45 | $allSchemes = $wgNarayamSchemes; |
46 | | - if ( !$wgNarayamUseBetaMapping ) { |
47 | | - foreach ( $allSchemes as $lang => $schemes ) { |
48 | | - foreach ( $schemes as $i => $scheme ) { |
49 | | - $version = isset( $scheme[1] ) ? $scheme[1] : "stable"; |
50 | | - if ( $version === "beta" ) { |
| 46 | + foreach ( $allSchemes as $lang => $schemes ) { |
| 47 | + foreach ( $schemes as $i => $scheme ) { |
| 48 | + $version = isset( $scheme[1] ) ? $scheme[1] : "stable"; |
| 49 | + if ( $version === "beta" ) { |
| 50 | + if ( !$wgNarayamUseBetaMapping ) { |
51 | 51 | unset( $allSchemes[$lang][$i] ); |
52 | 52 | } |
| 53 | + else { |
| 54 | + $allSchemes[$lang][$i] = $scheme[0]; |
| 55 | + } |
53 | 56 | } |
| 57 | + else { |
| 58 | + $allSchemes[$lang][$i] = $scheme; |
| 59 | + } |
54 | 60 | } |
55 | 61 | } |
56 | 62 | $vars['wgNarayamAllSchemes'] = $allSchemes; |
— | — | @@ -73,13 +79,19 @@ |
74 | 80 | $wgNarayamSchemes[$pagelang] : array(); |
75 | 81 | |
76 | 82 | $schemes = $userlangSchemes + $contlangSchemes + $pagelangSchemes; |
77 | | - if ( !$wgNarayamUseBetaMapping ) { |
78 | | - foreach ( $schemes as $i => $scheme ) { |
79 | | - $version = isset( $scheme[1] ) ? $scheme[1] : "stable"; |
80 | | - if ( $version === "beta" ) { |
| 83 | + foreach ( $schemes as $i => $scheme ) { |
| 84 | + $version = isset( $scheme[1] ) ? $scheme[1] : "stable"; |
| 85 | + if ( $version === "beta" ) { |
| 86 | + if ( !$wgNarayamUseBetaMapping ) { |
81 | 87 | unset( $schemes[$i] ); |
82 | 88 | } |
| 89 | + else { |
| 90 | + $schemes[$i] = $scheme[0]; |
| 91 | + } |
83 | 92 | } |
| 93 | + else { |
| 94 | + $schemes[$i] = $scheme; |
| 95 | + } |
84 | 96 | } |
85 | 97 | return $schemes; |
86 | 98 | } |