mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -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
|
@ -125,7 +125,7 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
|
|||
));
|
||||
|
||||
// Get users online information.
|
||||
$sql = 'SELECT u.user_id, u.username, u.user_rank, s.session_time AS user_session_time, u.user_opt, s.session_logged_in, s.session_ip, s.session_agent, s.session_start
|
||||
$sql = 'SELECT u.user_id, u.username, u.user_rank, s.session_time AS user_session_time, u.user_opt, s.session_logged_in, s.session_ip, s.session_start
|
||||
FROM ' . BB_USERS . ' u, ' . BB_SESSIONS . ' s
|
||||
WHERE s.session_logged_in = 1
|
||||
AND u.user_id = s.session_user_id
|
||||
|
@ -138,7 +138,7 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
|
|||
$onlinerow_reg = DB()->sql_fetchrowset($result);
|
||||
|
||||
// Get guests online information.
|
||||
$sql = 'SELECT session_logged_in, session_time, session_ip, session_agent, session_start
|
||||
$sql = 'SELECT session_logged_in, session_time, session_ip, session_start
|
||||
FROM ' . BB_SESSIONS . '
|
||||
WHERE session_logged_in = 0
|
||||
AND session_time >= ' . (TIMENOW - 300) . '
|
||||
|
@ -164,7 +164,6 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
|
|||
'LASTUPDATE' => bb_date($onlinerow_reg[$i]['user_session_time'], 'H:i', false),
|
||||
'IP_ADDRESS' => $reg_ip,
|
||||
'U_WHOIS_IP' => $bb_cfg['whois_info'] . $reg_ip,
|
||||
'USER_DEVICE' => get_user_device($onlinerow_reg[$i]['session_agent']),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +183,6 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
|
|||
'LASTUPDATE' => bb_date($onlinerow_guest[$i]['session_time'], 'H:i', false),
|
||||
'IP_ADDRESS' => $guest_ip,
|
||||
'U_WHOIS_IP' => $bb_cfg['whois_info'] . $guest_ip,
|
||||
'USER_DEVICE' => get_user_device($onlinerow_guest[$i]['session_agent']),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
"guzzlehttp/guzzle": "^7.5",
|
||||
"guzzlehttp/psr7": "^2.4",
|
||||
"longman/ip-tools": "1.2.1",
|
||||
"mobiledetect/mobiledetectlib": "^3.74",
|
||||
"monolog/monolog": "^2.9",
|
||||
"rych/bencode": "v1.0.0",
|
||||
"samdark/sitemap": "2.4.0",
|
||||
|
|
60
composer.lock
generated
60
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "b219ffca9c988e2666f5fd1b963cd675",
|
||||
"content-hash": "37120ee700fdd2297989239da1026e46",
|
||||
"packages": [
|
||||
{
|
||||
"name": "bugsnag/bugsnag",
|
||||
|
@ -962,64 +962,6 @@
|
|||
},
|
||||
"time": "2016-10-23T20:08:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mobiledetect/mobiledetectlib",
|
||||
"version": "3.74.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/serbanghita/Mobile-Detect.git",
|
||||
"reference": "812a4aa4605c63fc33d7fe32ca82f29275940b9d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/812a4aa4605c63fc33d7fe32ca82f29275940b9d",
|
||||
"reference": "812a4aa4605c63fc33d7fe32ca82f29275940b9d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "v2.19.3",
|
||||
"phpunit/phpunit": "^7.0.0",
|
||||
"squizlabs/php_codesniffer": "3.*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Detection\\": "src/"
|
||||
},
|
||||
"classmap": [
|
||||
"src/MobileDetect.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Serban Ghita",
|
||||
"email": "serbanghita@gmail.com",
|
||||
"homepage": "http://mobiledetect.net",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.",
|
||||
"homepage": "https://github.com/serbanghita/Mobile-Detect",
|
||||
"keywords": [
|
||||
"detect mobile devices",
|
||||
"mobile",
|
||||
"mobile detect",
|
||||
"mobile detector",
|
||||
"php mobile detect"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/serbanghita/Mobile-Detect/issues",
|
||||
"source": "https://github.com/serbanghita/Mobile-Detect/tree/3.74.0"
|
||||
},
|
||||
"time": "2022-12-04T15:37:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "2.9.1",
|
||||
|
|
|
@ -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'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2831,9 +2831,3 @@ $lang['EMAILER_SUBJECT'] = [
|
|||
'USER_WELCOME' => 'Welcome to the site %s',
|
||||
'USER_WELCOME_INACTIVE' => 'Welcome to the site %s',
|
||||
];
|
||||
|
||||
// Devices
|
||||
$lang['DEVICE'] = 'Device';
|
||||
$lang['DEVICE_MOBILE'] = 'Phone';
|
||||
$lang['DEVICE_TABLET'] = 'Tablet';
|
||||
$lang['DEVICE_PC'] = 'PC';
|
||||
|
|
|
@ -196,33 +196,29 @@
|
|||
|
||||
<!-- IF SHOW_USERS_ONLINE -->
|
||||
<table class="forumline">
|
||||
<tr>
|
||||
<th>{L_USERNAME}</th>
|
||||
<th>{L_LOGIN} / {L_LAST_UPDATED}</th>
|
||||
<th>{L_IP_ADDRESS}</th>
|
||||
<th>{L_DEVICE}</th>
|
||||
</tr>
|
||||
<!-- BEGIN reg_user_row -->
|
||||
<tr class="{reg_user_row.ROW_CLASS}">
|
||||
<td class="bold" nowrap="nowrap">{reg_user_row.USER}</td>
|
||||
<td align="center" nowrap="nowrap">{reg_user_row.STARTED}-{reg_user_row.LASTUPDATE}</td>
|
||||
<td class="tCenter"><a href="{reg_user_row.U_WHOIS_IP}" class="gen"
|
||||
target="_blank">{reg_user_row.IP_ADDRESS}</a>
|
||||
</td>
|
||||
<td class="tCenter">{reg_user_row.USER_DEVICE}</td>
|
||||
</tr>
|
||||
<!-- END reg_user_row -->
|
||||
<tr>
|
||||
<td colspan="4" class="row3"><img src="{SPACER}" width="1" height="1" alt="."></td>
|
||||
</tr>
|
||||
<!-- BEGIN guest_user_row -->
|
||||
<tr class="{guest_user_row.ROW_CLASS}">
|
||||
<td nowrap="nowrap">{L_GUEST}</td>
|
||||
<td align="center">{guest_user_row.STARTED}-{guest_user_row.LASTUPDATE}</td>
|
||||
<td class="tCenter"><a href="{guest_user_row.U_WHOIS_IP}" target="_blank">{guest_user_row.IP_ADDRESS}</a></td>
|
||||
<td class="tCenter">{guest_user_row.USER_DEVICE}</td>
|
||||
</tr>
|
||||
<!-- END guest_user_row -->
|
||||
<tr>
|
||||
<th>{L_USERNAME}</th>
|
||||
<th>{L_LOGIN} / {L_LAST_UPDATED}</th>
|
||||
<th>{L_IP_ADDRESS}</th>
|
||||
</tr>
|
||||
<!-- BEGIN reg_user_row -->
|
||||
<tr class="{reg_user_row.ROW_CLASS}">
|
||||
<td class="bold" nowrap="nowrap">{reg_user_row.USER}</td>
|
||||
<td align="center" nowrap="nowrap">{reg_user_row.STARTED}-{reg_user_row.LASTUPDATE}</td>
|
||||
<td class="tCenter"><a href="{reg_user_row.U_WHOIS_IP}" class="gen" target="_blank">{reg_user_row.IP_ADDRESS}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END reg_user_row -->
|
||||
<tr>
|
||||
<td colspan="3" class="row3"><img src="{SPACER}" width="1" height="1" alt="."></td>
|
||||
</tr>
|
||||
<!-- BEGIN guest_user_row -->
|
||||
<tr class="{guest_user_row.ROW_CLASS}">
|
||||
<td nowrap="nowrap">{L_GUEST}</td>
|
||||
<td align="center">{guest_user_row.STARTED}-{guest_user_row.LASTUPDATE}</td>
|
||||
<td class="tCenter"><a href="{guest_user_row.U_WHOIS_IP}" target="_blank">{guest_user_row.IP_ADDRESS}</a></td>
|
||||
</tr>
|
||||
<!-- END guest_user_row -->
|
||||
</table>
|
||||
<!-- ELSE -->
|
||||
<a href="{USERS_ONLINE_HREF}#online">{L_SHOW_ONLINE_USERLIST}</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue