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
/*
* Add 'rsactive' to differentiate rslight sessions from
* sessions from other applications
*/
$_SESSION['rsactive'] = true;
$client_device = get_client_user_agent_info();
if ($client_device != "bot") {
$_SESSION['rsactive'] = true;
}
// throttle_hits MUST be called before any data is sent
throttle_hits($client_device);
write_access_log();

View File

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

View File

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