r113843 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113842‎ | r113843 | r113844 >
Date:20:32, 14 March 2012
Author:preilly
Status:ok
Tags:
Comment:
fix string replacement for domain
Modified paths:
  • /trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php
@@ -111,7 +111,7 @@
112112
113113 if ( self::$isFilePage && self::$acceptBilling !== 'yes' ) {
114114 $acceptBillingYes = Html::rawElement( 'a',
115 - array( 'href' => str_replace( '.zero.', '.m.', wfExpandUrl( $wgRequest->appendQuery( 'acceptbilling=yes' . urlencode( $referrer ) ), PROTO_CURRENT ) ) ),
 115+ array( 'href' => str_replace( '.wikipedia.org/', '.m.wikipedia.org/', wfExpandUrl( $wgRequest->appendQuery( 'acceptbilling=yes' . urlencode( $referrer ) ), PROTO_CURRENT ) ) ),
116116 wfMsg( 'zero-rated-mobile-access-banner-text-data-charges-yes' ) );
117117 $referrer = $wgRequest->getHeader( 'referer' );
118118 $acceptBillingNo = Html::rawElement( 'a',

Follow-up revisions

RevisionCommit summaryAuthorDate
r1138441.19wmf: MFT r113843preilly20:32, 14 March 2012

Status & tagging log