diff --git a/functions.php b/functions.php index 254e2777..8d72ae75 100644 --- a/functions.php +++ b/functions.php @@ -1517,12 +1517,19 @@ function logAction($type, $action, $description, $client_id = 0, $entity_id = 0) $session_user_id = 0; } + $type = substr($type, 0, 200); + $action = substr($action, 0, 255); + $description = substr($description, 0, 1000); + mysqli_query($mysqli, "INSERT INTO logs SET log_type = '$type', log_action = '$action', log_description = '$description', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $entity_id"); } function logApp($category, $type, $details) { global $mysqli; + $category = substr($details, 0, 200); + $details = substr($details, 0, 1000); + mysqli_query($mysqli, "INSERT INTO app_logs SET app_log_category = '$category', app_log_type = '$type', app_log_details = '$details'"); }