Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -493,7 +493,7 @@ |
494 | 494 | * @return bool |
495 | 495 | */ |
496 | 496 | public function beforePageDisplayHTML( &$out, &$text ) { |
497 | | - global $wgContLang, $wgRequest, $wgMemc, $wgUser; |
| 497 | + global $wgContLang, $wgRequest, $wgMemc, $wgUser, $wgConf; |
498 | 498 | wfProfileIn( __METHOD__ ); |
499 | 499 | |
500 | 500 | $userAgent = $_SERVER['HTTP_USER_AGENT']; |
— | — | @@ -678,8 +678,12 @@ |
679 | 679 | $this->sendApplicationVersionVaryHeader(); |
680 | 680 | $this->checkUserStatus(); |
681 | 681 | $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' ) { |
684 | 688 | self::$displayNoticeId = 2; |
685 | 689 | } |
686 | 690 | |
— | — | @@ -1596,7 +1600,7 @@ |
1597 | 1601 | $sopaNoticeTemplate = new SopaNoticeTemplate(); |
1598 | 1602 | $sopaNoticeTemplate->set( 'messages', self::$messages ); |
1599 | 1603 | $noticeHtml = $sopaNoticeTemplate->getHTML(); |
1600 | | - } |
| 1604 | + } |
1601 | 1605 | } |
1602 | 1606 | |
1603 | 1607 | // header( 'Content-Type: application/xhtml+xml; charset=utf-8' ); |