r109587 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109586‎ | r109587 | r109588 >
Date:23:57, 19 January 2012
Author:preilly
Status:ok
Tags:
Comment:
1.18wmf: MFT r109586
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php
@@ -493,7 +493,7 @@
494494 * @return bool
495495 */
496496 public function beforePageDisplayHTML( &$out, &$text ) {
497 - global $wgContLang, $wgRequest, $wgMemc, $wgUser;
 497+ global $wgContLang, $wgRequest, $wgMemc, $wgUser, $wgConf;
498498 wfProfileIn( __METHOD__ );
499499
500500 $userAgent = $_SERVER['HTTP_USER_AGENT'];
@@ -678,8 +678,12 @@
679679 $this->sendApplicationVersionVaryHeader();
680680 $this->checkUserStatus();
681681 $this->checkUserLoggedIn();
682 -
683 - if (self::$code === 'en') {
 682+
 683+ $DB = wfGetDB( DB_MASTER );
 684+ $DBName = $DB->getDBname();
 685+
 686+ list( $site, $lang ) = $wgConf->siteFromDB( $DBName );
 687+ if ( $site == 'wikipedia' && self::$code === 'en' ) {
684688 self::$displayNoticeId = 2;
685689 }
686690
@@ -1596,7 +1600,7 @@
15971601 $sopaNoticeTemplate = new SopaNoticeTemplate();
15981602 $sopaNoticeTemplate->set( 'messages', self::$messages );
15991603 $noticeHtml = $sopaNoticeTemplate->getHTML();
1600 - }
 1604+ }
16011605 }
16021606
16031607 // header( 'Content-Type: application/xhtml+xml; charset=utf-8' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109586only show sopa banner on wikipediapreilly23:57, 19 January 2012

Status & tagging log