r113784 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113783‎ | r113784 | r113785 >
Date:23:13, 13 March 2012
Author:preilly
Status:ok
Tags:
Comment:
1.19wmf: MFT r113783
Modified paths:
  • /branches/wmf/1.19wmf1/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php
@@ -54,7 +54,7 @@
5555 * @return bool
5656 */
5757 public function beforePageDisplayHTML( &$out, &$text ) {
58 - global $wgRequest, $wgConf, $wgEnableZeroRatedMobileAccessTesting, $wgZeroDisableImages;
 58+ global $wgRequest, $wgConf, $wgEnableZeroRatedMobileAccessTesting, $wgZeroDisableImages, $wgSitename;
5959 wfProfileIn( __METHOD__ );
6060
6161 $DB = wfGetDB( DB_MASTER );
@@ -199,20 +199,14 @@
200200 for ( $i = 0; $i < $sizeOfLanguagesForCountry; $i++ ) {
201201 $languageName = $languageNames[$languagesForCountry[$i]['language']];
202202 $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 );
217211 }
218212 }
219213 $output .= Html::element( 'hr' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113783change zero landing pagepreilly23:12, 13 March 2012

Status & tagging log