Alex Monk has uploaded a new change for review.
https://gerrit.wikimedia.org/r/227471
Change subject: Check wgLocalVirtualHosts instead of just $wgConf->isLocalVHost
......................................................................
Check wgLocalVirtualHosts instead of just $wgConf->isLocalVHost
I25204d37 deprecated $wgConf->localVHosts, and changed core to check
$wgLocalVirtualHosts as well as isLocalVHost. Once Ie3fefa19 is
deployed only wgLocalVirtualHosts will be set in WMF production.
Change-Id: Ibb81fee38d91e26e143160da8b5b2b06ae268396
---
M includes/ZeroSpecialPage.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner
refs/changes/71/227471/1
diff --git a/includes/ZeroSpecialPage.php b/includes/ZeroSpecialPage.php
index 1ddc43e..4e174b6 100644
--- a/includes/ZeroSpecialPage.php
+++ b/includes/ZeroSpecialPage.php
@@ -319,6 +319,7 @@
* @return string
*/
private function renderUnknownZeroPartnerPage( PageRendering $state ) {
+ global $wgLocalVirtualHosts;
// This page contains client IP and should not be cached
$this->getOutput()->enableClientCache( false );
$req = $this->getRequest();
@@ -340,7 +341,9 @@
global $wgZeroSiteOverride, $wgConf;
if ( $wgZeroSiteOverride ||
$wgConf->isLocalVHost( implode( '.',
array_slice( $hp, -2, 2 ) ) ) ||
- $wgConf->isLocalVHost( implode( '.',
array_slice( $hp, -3, 3 ) ) )
+ in_array( implode( '.', array_slice(
$hp, -2, 2 ) ), $wgLocalVirtualHosts ) ||
+ $wgConf->isLocalVHost( implode( '.',
array_slice( $hp, -3, 3 ) ) ) ||
+ in_array( implode( '.', array_slice(
$hp, -3, 3 ) ), $wgLocalVirtualHosts )
) {
if ( $hp[1] === 'zero' ) {
$hp[1] = 'm';
--
To view, visit https://gerrit.wikimedia.org/r/227471
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb81fee38d91e26e143160da8b5b2b06ae268396
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroBanner
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits