Fix: add Mac OS

This commit is contained in:
Regis Houssin 2015-11-01 17:27:41 +01:00
parent a58b5f26f6
commit 0fd7ba478a

View File

@ -179,6 +179,7 @@ function getBrowserInfo($user_agent)
// OS // OS
if (preg_match('/linux/i', $user_agent)) { $os='linux'; } if (preg_match('/linux/i', $user_agent)) { $os='linux'; }
elseif (preg_match('/macintosh/i', $user_agent)) { $os='macintosh'; }
// Name // Name
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; } if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; }