From ccb2af6d179a78fd4627a6cb4f857d3154725b44 Mon Sep 17 00:00:00 2001 From: wrongecho Date: Tue, 20 May 2025 14:50:27 +0100 Subject: [PATCH] Fix category name/type logging when archiving/deleting a category --- post/admin/admin_category.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/post/admin/admin_category.php b/post/admin/admin_category.php index b5bd1273..fefb7a81 100644 --- a/post/admin/admin_category.php +++ b/post/admin/admin_category.php @@ -53,10 +53,10 @@ if (isset($_GET['archive_category'])) { mysqli_query($mysqli,"UPDATE categories SET category_archived_at = NOW() WHERE category_id = $category_id"); // Logging - logAction("Category", "Archive", "$session_name archived category $type $name", 0, $category_id); + logAction("Category", "Archive", "$session_name archived category $category_type $category_name", 0, $category_id); $_SESSION['alert_type'] = "error"; - $_SESSION['alert_message'] = "Category $type $name archived"; + $_SESSION['alert_message'] = "Category $category_type $category_name archived"; header("Location: " . $_SERVER["HTTP_REFERER"]); @@ -75,9 +75,9 @@ if (isset($_GET['unarchive_category'])) { mysqli_query($mysqli,"UPDATE categories SET category_archived_at = NULL WHERE category_id = $category_id"); // Logging - logAction("Category", "Unarchive", "$session_name unarchived category $type $name", 0, $category_id); + logAction("Category", "Unarchive", "$session_name unarchived category $category_type $category_name", 0, $category_id); - $_SESSION['alert_message'] = "Category $type $name unarchived"; + $_SESSION['alert_message'] = "Category $category_type $category_name unarchived"; header("Location: " . $_SERVER["HTTP_REFERER"]); @@ -96,10 +96,10 @@ if (isset($_GET['delete_category'])) { mysqli_query($mysqli,"DELETE FROM categories WHERE category_id = $category_id"); // Logging - logAction("Category", "Delete", "$session_name deleted category $type $name"); + logAction("Category", "Delete", "$session_name deleted category $category_type $category_name"); $_SESSION['alert_type'] = "error"; - $_SESSION['alert_message'] = "Category $type $name deleted"; + $_SESSION['alert_message'] = "Category $category_type $category_name deleted"; header("Location: " . $_SERVER["HTTP_REFERER"]);