mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 10:37:30 -07:00
Revert "[ACP] Added showing user device type in online info (#772)"
This reverts commit a8eec778df
.
This commit is contained in:
parent
ba2bc4b56e
commit
c3e1e7283b
6 changed files with 26 additions and 119 deletions
|
@ -2062,25 +2062,3 @@ function user_birthday_icon($user_birthday, $user_id): string
|
|||
|
||||
return ($bb_cfg['birthday_enabled'] && $current_date == $user_birthday) ? '<img src="' . $images['icon_birthday'] . '" alt="" title="' . $lang['HAPPY_BIRTHDAY'] . '" border="0" />' : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user device type (PC, Tablet, Phone) by USER_AGENT
|
||||
*
|
||||
* @param string $user_agent
|
||||
* @return string
|
||||
*/
|
||||
function get_user_device($user_agent = USER_AGENT): string
|
||||
{
|
||||
global $lang;
|
||||
|
||||
$detect = new \Detection\MobileDetect();
|
||||
$detect->setUserAgent($user_agent);
|
||||
|
||||
if ($detect->isMobile()) {
|
||||
return $lang['DEVICE_MOBILE'];
|
||||
} else if ($detect->isTablet()) {
|
||||
return $lang['DEVICE_TABLET'];
|
||||
} else {
|
||||
return $lang['DEVICE_PC'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue