r113783 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113782‎ | r113783 | r113784 >
Date:23:12, 13 March 2012
Author:preilly
Status:ok (Comments)
Tags:
Comment:
change zero landing page
Modified paths:
  • /trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php (modified) (history)

Diff [purge]

Index: trunk/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' );

Sign-offs

UserFlagDate
Laberkisteinspected23:13, 13 March 2012

Follow-up revisions

RevisionCommit summaryAuthorDate
r1137841.19wmf: MFT r113783preilly23:13, 13 March 2012

Comments

#Comment by MaxSem (talk | contribs)   19:01, 20 March 2012

Note: implicit Message to string is a PHP 5.3-only feature.

Status & tagging log