From 1cd98b099ba83521e20ce0fe024788fee8164248 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 13 Feb 2013 23:10:55 -0500 Subject: [PATCH] Doc: Reorder Android detection, the browser's user agent string contains the Linux keyword too. --- doc/download.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/download.php b/doc/download.php index 0aa3be616e..981aa2c8db 100644 --- a/doc/download.php +++ b/doc/download.php @@ -157,14 +157,16 @@ if (get_str2('all_platforms')) { } else { show_download('mac'); } -} else if (strstr($client_info, 'Linux')) { - if (strstr($client_info, 'x86_64')) { - show_download('linuxx64'); - } else { - show_download('linux'); - } -} else if (strstr($client_info, 'Android')) { +} else if (strstr($client_info, 'Linux') && strstr($client_info, 'Android')) { + // Check for Android before Linux, since Android contains the Linux kernel and the + // web browser user agent string list Linux too. show_download('android'); +} else if (strstr($client_info, 'Linux')) { + if (strstr($client_info, 'x86_64')) { + show_download('linuxx64'); + } else { + show_download('linux'); + } } else { show_download(null); }