Index: trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | * @return bool |
56 | 56 | */ |
57 | 57 | public function beforePageDisplayHTML( &$out, &$text ) { |
58 | | - global $wgRequest, $wgConf, $wgEnableZeroRatedMobileAccessTesting, $wgZeroDisableImages; |
| 58 | + global $wgRequest, $wgConf, $wgEnableZeroRatedMobileAccessTesting, $wgZeroDisableImages, $wgSitename; |
59 | 59 | wfProfileIn( __METHOD__ ); |
60 | 60 | |
61 | 61 | $DB = wfGetDB( DB_MASTER ); |
— | — | @@ -199,20 +199,14 @@ |
200 | 200 | for ( $i = 0; $i < $sizeOfLanguagesForCountry; $i++ ) { |
201 | 201 | $languageName = $languageNames[$languagesForCountry[$i]['language']]; |
202 | 202 | $languageCode = $languagesForCountry[$i]['language']; |
203 | | - $output .= Html::element( 'hr' ); |
204 | | - $output .= Html::element( 'h3', array( 'id' => 'lang_' . $languageCode ), $languageName ); |
205 | | - if ( $i == 0 ) { |
206 | | - $output .= self::getSearchFormHtml( $languageCode ); |
207 | | - } else { |
208 | | - $languageUrl = sprintf( self::$formatMobileUrl, $languageCode ); |
209 | | - $output .= Html::element( 'a', |
210 | | - array( 'id' => 'lang_' . $languageCode, |
211 | | - 'href' => $languageUrl ), |
212 | | - wfMessage( 'zero-rated-mobile-access-home-page-selection', |
213 | | - $languageName )->inLanguage( $languageCode ) |
214 | | - ); |
215 | | - $output .= Html::element( 'br' ); |
216 | | - } |
| 203 | + $languageUrl = sprintf( self::$formatMobileUrl, $languageCode ); |
| 204 | + $languageLink = Html::element( 'a', |
| 205 | + array( 'id' => 'lang_' . $languageCode, |
| 206 | + 'href' => $languageUrl ), |
| 207 | + wfMessage( 'zero-rated-mobile-access-home-page-selection', |
| 208 | + $languageName )->inLanguage( $languageCode ) |
| 209 | + ); |
| 210 | + $output .= Html::rawElement( 'h3', array( 'id' => 'lang_' . $languageCode ), $languageLink ); |
217 | 211 | } |
218 | 212 | } |
219 | 213 | $output .= Html::element( 'hr' ); |