From 80ed75a6ad9c434d1fba3ee873496be12dc942b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Tue, 12 Nov 2019 15:59:19 +0100 Subject: [PATCH] Im Statistik SQL wird die Variable $user automatisch durch den eingeloggten User ersetzt. --- include/statistik.class.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/include/statistik.class.php b/include/statistik.class.php index 89ae1c752..f45cfde53 100644 --- a/include/statistik.class.php +++ b/include/statistik.class.php @@ -514,6 +514,13 @@ class statistik extends basis_db if($this->sql!='') { $sql = $this->sql; + + // Wenn im SQL ein $user vorkommt wird das durch den eingeloggten User ersetzt + if(strpos($sql, '$user')!==false) + { + $uid = get_uid(); + $sql = str_replace('$user',$this->db_add_param($uid),$sql); + } foreach($_REQUEST as $name=>$value) { if (is_array($value)) @@ -615,11 +622,15 @@ class statistik extends basis_db $check = '/\$[0-9A-z]+/'; preg_match_all($check, $value, $result); $result = $result[0]; - + $vars = array(); for($i=0;$i