summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics
diff options
context:
space:
mode:
authorSimon Rettberg2026-04-29 14:12:46 +0200
committerSimon Rettberg2026-04-29 14:12:46 +0200
commite9dd3b47e64f43d967a08cfc78efdffa95130a95 (patch)
tree7320ae4709724ccd769ebf9a6368565640afe85d /modules-available/statistics
parent[runmode] Add UUID to selected clients, close dropdown on select (diff)
parent[locationinfo] Use dedicated list permission for extdevices (diff)
downloadslx-admin-e9dd3b47e64f43d967a08cfc78efdffa95130a95.tar.gz
slx-admin-e9dd3b47e64f43d967a08cfc78efdffa95130a95.tar.xz
slx-admin-e9dd3b47e64f43d967a08cfc78efdffa95130a95.zip
Merge branch 'master' of git.openslx.org:openslx-ng/slx-admin
Diffstat (limited to 'modules-available/statistics')
-rw-r--r--modules-available/statistics/api.inc.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules-available/statistics/api.inc.php b/modules-available/statistics/api.inc.php
index 8f0f0810..a3f1757f 100644
--- a/modules-available/statistics/api.inc.php
+++ b/modules-available/statistics/api.inc.php
@@ -3,8 +3,9 @@
if (empty($_POST['type'])) die('Missing options.');
$type = mb_strtolower($_POST['type']);
-$ip = $_SERVER['REMOTE_ADDR'];
-if (substr($ip, 0, 7) === '::ffff:') $ip = substr($ip, 7);
+$ip = Util::getClientIp();
+if ($ip === null)
+ ErrorHandler::traceError("could not determine client IP");
/*
* Section 1/2