Skip to content

Instantly share code, notes, and snippets.

@pmclanahan
Created August 6, 2012 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmclanahan/3277709 to your computer and use it in GitHub Desktop.
Save pmclanahan/3277709 to your computer and use it in GitHub Desktop.
Bug 780545 - Remove special redirects from bug 767985.
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