From 26dca806049b4906c2fce6be9bde69acd68d16c6 Mon Sep 17 00:00:00 2001 From: Pinga Date: Fri, 4 Jul 2025 17:22:58 +0300 Subject: [PATCH] Small fixes --- automation/abusemonitor.php | 1 - automation/helpers.php | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automation/abusemonitor.php b/automation/abusemonitor.php index a49288a..087826c 100644 --- a/automation/abusemonitor.php +++ b/automation/abusemonitor.php @@ -36,7 +36,6 @@ if (!is_dir($cachePath)) { // Attempt to create the directory if (!mkdir($cachePath, 0755, true)) { $log->error("Unable to create cache directory at $cachePath. Please check permissions."); - throw new Exception("Unable to create cache directory at $cachePath. Please check permissions."); } } diff --git a/automation/helpers.php b/automation/helpers.php index b76e8b9..e1f6dc7 100644 --- a/automation/helpers.php +++ b/automation/helpers.php @@ -241,14 +241,15 @@ function processAbuseDetection($pdo, $domain, $clid, $abuseType, $evidenceLink, if ($userData) { // Prepare INSERT statement to add a ticket - $insertStmt = $pdo->prepare('INSERT INTO support_tickets (id, user_id, category_id, subject, message, status, priority, reported_domain, nature_of_abuse, evidence, relevant_urls, date_of_incident, date_created, last_updated) VALUES (NULL, ?, 8, ?, ?, "Open", "High", ?, "Abuse", ?, ?, ?, CURRENT_TIMESTAMP(3), CURRENT_TIMESTAMP(3))'); + $insertStmt = $pdo->prepare('INSERT INTO support_tickets (id, user_id, category_id, subject, message, status, priority, reported_domain, nature_of_abuse, evidence, relevant_urls, date_of_incident, date_created, last_updated) VALUES (NULL, ?, 8, ?, ?, "Open", "High", ?, ?, ?, ?, ?, CURRENT_TIMESTAMP(3), CURRENT_TIMESTAMP(3))'); // Execute the prepared statement with appropriate values $insertStmt->execute([ $userData['user_id'], // user_id - "Abuse Report for $domain ($abuseType)", // subject + "Abuse Report for $domain", // subject "Abuse detected for domain $domain via $abuseType.", // message $domain, // reported_domain + $abuseType, // nature_of_abuse "Link to $abuseType", // evidence $evidenceLink, // relevant_urls date('Y-m-d H:i:s') // date_of_incident