Some cleanup in counting users.

This commit is contained in:
Retro_Guy 2023-09-06 04:33:59 -07:00
parent d8d2509ed2
commit 161cd394b5
3 changed files with 10 additions and 6 deletions

View File

@ -1,9 +1,12 @@
<?php <?php
/*
$client_device = get_client_user_agent_info(); * Add 'rsactive' to differentiate rslight sessions from
if ($client_device != "bot") { * sessions from other applications
*/
$_SESSION['rsactive'] = true; $_SESSION['rsactive'] = true;
} $client_device = get_client_user_agent_info();
// throttle_hits MUST be called before any data is sent
throttle_hits($client_device); throttle_hits($client_device);
write_access_log(); write_access_log();

View File

@ -1754,8 +1754,10 @@ function throttle_hits($client_device)
} }
exit(0); exit(0);
} }
if (isset($_SESSION['throttled'])) {
unset($_SESSION['throttled']); unset($_SESSION['throttled']);
} }
}
function get_client_user_agent_info() function get_client_user_agent_info()
{ {

View File

@ -5,7 +5,6 @@ $_SESSION['group'] = $_SERVER['REQUEST_URI'];
include "config.inc.php"; include "config.inc.php";
include ("$file_newsportal"); include ("$file_newsportal");
include "auth.inc";
// register parameters // register parameters
$group = _rawurldecode($_REQUEST["group"]); $group = _rawurldecode($_REQUEST["group"]);