jenkins-bot has submitted this change and it was merged.

Change subject: Redirect zerodot wikipedia webroot to mdot if OK
......................................................................


Redirect zerodot wikipedia webroot to mdot if OK

Previously, zero.wikipedia.org/ webroots on Wikipedia Zero
partner networks with only mdot languages being supported
were still being sent to a landing on lang.zero.wikipedia.org,
resulting in an unnecessary error. This patch tries to send
those users to the appropriate lang.m.wikipedia.org landing
location instead.

Change-Id: Ic99e2dcf8a005b87597bab1380ec0cd51f23a318
---
M includes/PageRendering.php
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Yurik: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/PageRendering.php b/includes/PageRendering.php
index 03f7cf2..d20b6ad 100644
--- a/includes/PageRendering.php
+++ b/includes/PageRendering.php
@@ -951,7 +951,12 @@
                // We don't want the cached object pool to get huge.
                $this->getOutput()->addVaryHeader( 'Accept-Language' );
                $protocol = PROTO_CURRENT;
-               $config = $this->getZeroConfig();
+               // In case the user hit zero.wikipedia.org/ and yet only mdot 
is supported
+               // we choose to ignore the site array ([m.wikipedia]) in the 
subcalls
+               // TODO: When expanding mediawiki-config/mobilelanding.php (see 
puppet repo's
+               // wwwportals.conf for rewrite rule) to cover more than mobile 
Wikipedias,
+               // revisit this logic.
+               $config = $this->getZeroConfig( ZeroConfig::ignoreSite );
                $request = $this->getRequest();
                $flags = 0;
                if ( !$config ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/179357
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic99e2dcf8a005b87597bab1380ec0cd51f23a318
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroBanner
Gerrit-Branch: master
Gerrit-Owner: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: Dfoy <[email protected]>
Gerrit-Reviewer: Yurik <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to