r108697 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108696‎ | r108697 | r108698 >
Date:23:40, 11 January 2012
Author:preilly
Status:ok
Tags:
Comment:
fix for r108565 c29376
Modified paths:
  • /trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php
@@ -24,10 +24,13 @@
2525 * @return bool
2626 */
2727 public function beforePageDisplayHTML( &$out, &$text ) {
28 - global $wgRequest, $wgConf, $wgDBname, $wgEnableZeroRatedMobileAccessTesting;
 28+ global $wgRequest, $wgConf, $wgEnableZeroRatedMobileAccessTesting;
2929 wfProfileIn( __METHOD__ );
3030
31 - list( $site, $lang ) = $wgConf->siteFromDB( $wgDBname );
 31+ $dB = wfGetDB( DB_MASTER );
 32+ $dBname = $dB->getDBname();
 33+
 34+ list( $site, $lang ) = $wgConf->siteFromDB( $dBname );
3235 if ( $site == 'wikipedia' || $wgEnableZeroRatedMobileAccessTesting ) {
3336
3437 $xDevice = isset( $_SERVER['HTTP_X_DEVICE'] ) ? $_SERVER['HTTP_X_DEVICE'] : '';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108565enable extension only if testing or on wikipediapreilly23:42, 10 January 2012

Status & tagging log