r108651 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108650‎ | r108651 | r108652 >
Date:18:57, 11 January 2012
Author:preilly
Status:ok
Tags:
Comment:
fix for r108538 c29341
Modified paths:
  • /trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php
@@ -1,7 +1,7 @@
22 <?php
33
44 class ExtZeroRatedMobileAccess {
5 - const VERSION = '0.0.7';
 5+ const VERSION = '0.0.8';
66
77 public static $renderZeroRatedLandingPage;
88 public static $renderZeroRatedBanner;
@@ -39,8 +39,7 @@
4040 return true;
4141 }
4242
43 - $output = Html::openElement( 'div',
44 - array( 'id' => 'zero-landing-page' ) );
 43+ $output = '';
4544
4645 self::$renderZeroRatedLandingPage = $wgRequest->getFuzzyBool( 'renderZeroRatedLandingPage' );
4746 self::$renderZeroRatedBanner = $wgRequest->getFuzzyBool( 'renderZeroRatedBanner' );
@@ -206,8 +205,8 @@
207206 $output .= Html::closeElement( 'select' );
208207 }
209208
210 - $output .= Html::closeElement( 'div' );
211 - if ( $output != '<div id="zero-landing-page"></div>' ) {
 209+ if ( $output ) {
 210+ $output = Html::openElement( 'div', array( 'id' => 'zero-landing-page' ) ) . $output . Html::closeElement( 'div' );
212211 $out->addHTML( $output );
213212 }
214213 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108538do not call the addHTML method unless needed also check carrier header correctlypreilly19:54, 10 January 2012

Status & tagging log