Index: branches/wmf/1.19wmf1/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
— | — | @@ -1694,12 +1694,14 @@ |
1695 | 1695 | |
1696 | 1696 | switch ( $type ) { |
1697 | 1697 | case 'request': |
1698 | | - $count = 0; |
1699 | | - //Count's just there making sure we don't get stuck here. |
1700 | | - while ( !in_array( $language, $this->getAvailableLanguages() ) && $count < 3 ){ |
1701 | | - // Get the fallback language |
1702 | | - $language = Language::getFallbackFor( $language ); |
1703 | | - $count += 1; |
| 1698 | + if ( !in_array( $language, $this->getAvailableLanguages() ) ) { |
| 1699 | + $fallbacks = Language::getFallbacksFor( $language ); |
| 1700 | + foreach ( $fallbacks as $fallback ) { |
| 1701 | + if ( in_array( $fallback, $this->getAvailableLanguages() ) ) { |
| 1702 | + $language = $fallback; |
| 1703 | + break; |
| 1704 | + } |
| 1705 | + } |
1704 | 1706 | } |
1705 | 1707 | |
1706 | 1708 | if ( !in_array( $language, $this->getAvailableLanguages() ) ){ |
Property changes on: branches/wmf/1.19wmf1/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
1707 | 1709 | Merged /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php:r111043,111199,111218,111484,111575,111604,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111796,111814,111947,112074,112153,112160,112166,112260,112282,112300 |
1708 | 1710 | Merged /branches/sqlite/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php:r58211-58321 |
1709 | 1711 | Merged /trunk/phase3/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251 |
1710 | 1712 | Merged /branches/new-installer/phase3/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php:r43664-66004 |
1711 | 1713 | Merged /branches/JSTesting/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php:r100352-107913 |
1712 | 1714 | Merged /branches/REL1_15/phase3/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php:r51646 |
1713 | 1715 | Merged /branches/wmf/1.18wmf1/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php:r97508 |
1714 | 1716 | Merged /branches/REL1_17/phase3/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php:r81445,81448 |
Index: branches/wmf/1.19wmf1/extensions/SecurePoll/includes/pages/Page.php |
— | — | @@ -38,16 +38,14 @@ |
39 | 39 | } |
40 | 40 | $wgLang = Language::factory( $userLang ); |
41 | 41 | |
42 | | - $languages = array( $userLang ); |
43 | | - $fallback = $userLang; |
44 | | - while ( $fallback = Language::getFallbackFor( $fallback ) ) { |
45 | | - $languages[] = $fallback; |
| 42 | + $languages = array_merge( |
| 43 | + array( $userLang ), |
| 44 | + Language::getFallbacksFor( $userLang ) ); |
| 45 | + |
| 46 | + if ( !in_array( $election->getLanguage(), $languages ) ) { |
| 47 | + $languages[] = $election->getLanguage(); |
46 | 48 | } |
47 | | - if ( $fallback != $election->getLanguage() ) { |
48 | | - $fallback = $election->getLanguage(); |
49 | | - $languages[] = $fallback; |
50 | | - } |
51 | | - if ( $fallback != 'en' ) { |
| 49 | + if ( !in_array( 'en', $languages ) ) { |
52 | 50 | $languages[] = 'en'; |
53 | 51 | } |
54 | 52 | $this->context->setLanguages( $languages ); |
Property changes on: branches/wmf/1.19wmf1/extensions/SecurePoll/includes/pages/Page.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
55 | 53 | Merged /branches/JSTesting/extensions/SecurePoll/includes/pages/Page.php:r100352-107913 |
56 | 54 | Merged /branches/REL1_15/phase3/extensions/SecurePoll/includes/pages/Page.php:r51646 |
57 | 55 | Merged /branches/wmf/1.18wmf1/extensions/SecurePoll/includes/pages/Page.php:r97508 |
58 | 56 | Merged /branches/REL1_17/phase3/extensions/SecurePoll/includes/pages/Page.php:r81445,81448 |
59 | 57 | Merged /trunk/extensions/SecurePoll/includes/pages/Page.php:r111043,111199,111218,111484,111575,111604,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111796,111814,111947,112074,112153,112160,112166,112260,112282,112300 |
60 | 58 | Merged /branches/sqlite/extensions/SecurePoll/includes/pages/Page.php:r58211-58321 |
61 | 59 | Merged /trunk/phase3/extensions/SecurePoll/includes/pages/Page.php:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251 |
62 | 60 | Merged /branches/new-installer/phase3/extensions/SecurePoll/includes/pages/Page.php:r43664-66004 |
Index: branches/wmf/1.19wmf1/extensions/LandingCheck/SpecialLandingCheck.php |
— | — | @@ -178,10 +178,9 @@ |
179 | 179 | $landingPage . '/' . $language |
180 | 180 | ); |
181 | 181 | // Add fallback languages |
182 | | - $code = $language; |
183 | | - while ( $code !== 'en' ) { |
184 | | - $code = Language::getFallbackFor( $code ); |
185 | | - $targetTexts[] = $landingPage . '/' . $code; |
| 182 | + $fallbacks = Language::getFallbacksFor( $language ); |
| 183 | + foreach ( $fallbacks as $fallback ) { |
| 184 | + $targetTexts[] = $landingPage . '/' . $fallback; |
186 | 185 | } |
187 | 186 | } |
188 | 187 | |
Property changes on: branches/wmf/1.19wmf1/extensions/LandingCheck/SpecialLandingCheck.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
189 | 188 | Merged /branches/sqlite/extensions/LandingCheck/SpecialLandingCheck.php:r58211-58321 |
190 | 189 | Merged /trunk/phase3/extensions/LandingCheck/SpecialLandingCheck.php:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251 |
191 | 190 | Merged /branches/new-installer/phase3/extensions/LandingCheck/SpecialLandingCheck.php:r43664-66004 |
192 | 191 | Merged /branches/JSTesting/extensions/LandingCheck/SpecialLandingCheck.php:r100352-107913 |
193 | 192 | Merged /branches/REL1_15/phase3/extensions/LandingCheck/SpecialLandingCheck.php:r51646 |
194 | 193 | Merged /branches/wmf/1.18wmf1/extensions/LandingCheck/SpecialLandingCheck.php:r97508 |
195 | 194 | Merged /branches/REL1_17/phase3/extensions/LandingCheck/SpecialLandingCheck.php:r81445,81448 |
196 | 195 | Merged /trunk/extensions/LandingCheck/SpecialLandingCheck.php:r111043,111199,111218,111484,111575,111604,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111796,111814,111947,112074,112153,112160,112166,112260,112282,112300 |