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

Change subject: Remove b/c cookie code
......................................................................


Remove b/c cookie code

The old cookies should've expired since July 30 by now

Change-Id: Idcea645c7d3e0eafb33947ad64b2785e23735064
---
M includes/MobileContext.php
M tests/MobileContextTest.php
2 files changed, 1 insertion(+), 17 deletions(-)

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



diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 847a513..ee3031e 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -192,20 +192,8 @@
                        if ( $mobileAction === 'alpha' || $mobileAction === 
'beta' ) {
                                $this->mobileMode = $mobileAction;
                        } else {
-                               // First check old cookie
-                               // @todo: Remove in September when old cookies 
expire
                                $req = $this->getRequest();
-                               $alpha = $req->getCookie( 'mf_alpha', '' );
-                               if ( $alpha == 1 ) {
-                                       $req->response()->setcookie( 
'mf_alpha', '', 0, '' );
-                                       $this->setMobileMode( 'alpha' );
-                               } else {
-                                       $this->mobileMode = 
$this->getRequest()->getCookie( 'optin', '' );
-                                       // Old cookie format - handle it but no 
point in overwriting the cookie
-                                       if ( $this->mobileMode == '1' ) {
-                                               $this->mobileMode = 'beta';
-                                       }
-                               }
+                               $this->mobileMode = $req->getCookie( 'optin', 
'' );
                        }
                }
                return $this->mobileMode;
diff --git a/tests/MobileContextTest.php b/tests/MobileContextTest.php
index 46f705e..d383652 100644
--- a/tests/MobileContextTest.php
+++ b/tests/MobileContextTest.php
@@ -438,13 +438,9 @@
        public function optInProvider() {
                return array(
                        array( array(), false, false ),
-                       array( array( 'optin' => '1' ), false, true ),
                        array( array( 'optin' => 'beta' ), false, true ),
                        array( array( 'optin' => 'alpha' ), true, true ),
                        array( array( 'optin' => 'foobar' ), false, false ),
-                       array( array( 'optin' => '1', 'mf_alpha' => '1' ), 
true, true ),
-                       array( array( 'mf_alpha' => '1' ), true, true ),
-                       array( array( 'mf_alpha' => 'foobar' ), false, false ),
                );
        }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcea645c7d3e0eafb33947ad64b2785e23735064
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to