Yurik has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/180088

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
(cherry picked from commit dd78e2e01d14eabc65fe266ce14bcccf39980ddd)
---
M includes/PageRendering.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner 
refs/changes/88/180088/1

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/180088
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic99e2dcf8a005b87597bab1380ec0cd51f23a318
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroBanner
Gerrit-Branch: wmf/1.25wmf12
Gerrit-Owner: Yurik <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>

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

Reply via email to