r113732 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113731‎ | r113732 | r113733 >
Date:17:04, 13 March 2012
Author:preilly
Status:ok
Tags:
Comment:
add configuration option for disable images
Modified paths:
  • /trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php
@@ -53,7 +53,7 @@
5454 * @return bool
5555 */
5656 public function beforePageDisplayHTML( &$out, &$text ) {
57 - global $wgRequest, $wgConf, $wgEnableZeroRatedMobileAccessTesting;
 57+ global $wgRequest, $wgConf, $wgEnableZeroRatedMobileAccessTesting, $wgZeroDisableImages;
5858 wfProfileIn( __METHOD__ );
5959
6060 $DB = wfGetDB( DB_MASTER );
@@ -139,6 +139,9 @@
140140 } elseif ( self::$renderZeroRatedBanner === true ) {
141141 self::$carrier = $this->lookupCarrier( $carrier );
142142 if ( isset( self::$carrier['name'] ) ) {
 143+ if ( $wgZeroDisableImages === 1 ) {
 144+ self::$forceClickToViewImages = $wgZeroDisableImages;
 145+ }
143146 $html = $out->getHTML();
144147 $parsedHtml = $this->parseLinksForZeroQueryString( $html );
145148 $out->clearHTML();

Follow-up revisions

RevisionCommit summaryAuthorDate
r1137331.19wmf: MFT r113732preilly17:05, 13 March 2012

Status & tagging log