|
|
@@ -79,12 +79,14 @@ class WebRouteController extends Controller
|
|
|
$ua = $request->userAgent();
|
|
|
if (stripos($ua, 'iPhone') !== false) {
|
|
|
$mobileBand = 'iPhone';
|
|
|
- }
|
|
|
- if (preg_match('/Android\s[\d\.]+;\s([^)]+)/i', $ua, $match)) {
|
|
|
+ } else if (stripos($ua, 'iPad') !== false) {
|
|
|
+ $mobileBand = 'iPad';
|
|
|
+ } else if (stripos($ua, 'Android') !== false) {
|
|
|
$mobileBand = 'Android';
|
|
|
- }
|
|
|
- if (stripos($ua, 'Windows') !== false) {
|
|
|
+ } else if (stripos($ua, 'Windows') !== false) {
|
|
|
$mobileBand = 'PC';
|
|
|
+ } else if (stripos($ua, 'Mac') !== false) {
|
|
|
+ $mobileBand = 'Mac';
|
|
|
}
|
|
|
if (isset($mobileBand)) {
|
|
|
AccountsInfo::saveMobileBand($user->UserID, $mobileBand);
|