Created
August 6, 2012 19:18
-
-
Save pmclanahan/3277709 to your computer and use it in GitHub Desktop.
Bug 780545 - Remove special redirects from bug 767985.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: includes/prefetch.php | |
=================================================================== | |
--- includes/prefetch.php (revision 108075) | |
+++ includes/prefetch.php (working copy) | |
@@ -198,15 +198,8 @@ | |
if($parsed_path == '/firefox') { | |
// Redirect mobile devices (Android, Maemo, iPhone) | |
$is_mobile_redirected = mobile_redirect('/mobile/', 'iphone|ipad'); | |
- // Bug 767985 - Special redirects for Firefox Native Android launch | |
- if($is_mobile_redirected) { | |
- $lang = 'en-US'; | |
- } else { | |
- if ($lang == 'en-US') { | |
- $is_mobile_redirected = mobile_redirect('/firefox/fx/'); | |
- } else { | |
- $is_mobile_redirected = mobile_redirect('/mobile/'); | |
- } | |
+ if(!$is_mobile_redirected) { | |
+ $is_mobile_redirected = mobile_redirect('/mobile/'); | |
} | |
} | |
@@ -223,15 +216,10 @@ | |
$ua = $_SERVER['HTTP_USER_AGENT']; | |
if(!$is_mobile_redirected) { | |
- // Bug 767985 - Special redirects for Firefox Native Android launch | |
- // All Firefox users for en-US go to the promo | |
- if ($lang == 'en-US' && stripos($ua, 'Firefox') !== FALSE) { | |
- $_SERVER['REQUEST_URI'] = '/firefox/fx/'; | |
- } | |
// Bug 629407 Redirect to user-specific pages | |
// This is also implemented in .htaccess, but we do it here | |
// to redirect the user only once | |
- elseif (preg_match('/Firefox\/(13|14|15|16)/', $ua)) { | |
+ if(preg_match('/Firefox\/(13|14|15|16)/', $ua)) { | |
$_SERVER['REQUEST_URI'] = '/firefox/fx/'; | |
} | |
else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment