mirror of https://github.com/itflow-org/itflow
substr to conform to db columns
This commit is contained in:
parent
283c2a17df
commit
83b7c7b054
|
|
@ -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'");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue