mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Updated the remaining posts except ticket to use new logAction function, tidy and added more details to logging
This commit is contained in:
@@ -24,8 +24,8 @@ if (isset($_GET['dismiss_notification'])) {
|
||||
|
||||
mysqli_query($mysqli,"UPDATE notifications SET notification_dismissed_at = NOW(), notification_dismissed_by = $session_user_id WHERE notification_id = $notification_id");
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Notification', log_action = 'Dismiss', log_description = '$session_name dismissed notification', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
|
||||
// Logging
|
||||
logAction("Notification", "Dismiss", "$session_name dismissed notification");
|
||||
|
||||
$_SESSION['alert_message'] = "Notification Dismissed";
|
||||
|
||||
@@ -47,8 +47,8 @@ if (isset($_GET['dismiss_all_notifications'])) {
|
||||
|
||||
}
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Notification', log_action = 'Dismiss', log_description = '$session_name dismissed $num_notifications notifications', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
|
||||
// Logging
|
||||
logAction("Notification", "Dismiss", "$session_name dismissed $num_notifications notifications");
|
||||
|
||||
$_SESSION['alert_message'] = "$num_notifications Notifications Dismissed";
|
||||
|
||||
@@ -59,8 +59,6 @@ if (isset($_GET['dismiss_all_notifications'])) {
|
||||
// Revoke sharing (sharing itself is done via ajax.php)
|
||||
if (isset($_GET['deactivate_shared_item'])) {
|
||||
|
||||
validateAdminRole();
|
||||
|
||||
$item_id = intval($_GET['deactivate_shared_item']);
|
||||
|
||||
// Get details of the shared link
|
||||
@@ -68,15 +66,15 @@ if (isset($_GET['deactivate_shared_item'])) {
|
||||
$row = mysqli_fetch_array($sql);
|
||||
$item_type = sanitizeInput($row['item_type']);
|
||||
$item_related_id = intval($row['item_related_id']);
|
||||
$item_client_id = intval($row['item_client_id']);
|
||||
$client_id = intval($row['item_client_id']);
|
||||
|
||||
// Deactivate item id
|
||||
mysqli_query($mysqli, "DELETE FROM shared_items WHERE item_id = $item_id");
|
||||
|
||||
// Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Sharing', log_action = 'Delete', log_description = '$session_name deactivated shared $item_type link. Item ID: $item_related_id. Share ID $item_id', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $item_client_id, log_user_id = $session_user_id, log_entity_id = $item_id");
|
||||
logAction("Sharing", "Delete", "$session_name deactivated shared $item_type link Item ID: $item_related_id. Share ID $item_id", $client_id, $item_id);
|
||||
|
||||
$_SESSION['alert_message'] = "Link deactivated";
|
||||
$_SESSION['alert_message'] = "Share Link deactivated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user