From e9c3ee466117920e723d5ea3aa15ac281333187d Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 24 Apr 2026 11:40:38 -0400 Subject: [PATCH] Shared Items via secure link: Do not delete shared items that have not been viewed before cron runs --- cron/cron.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cron/cron.php b/cron/cron.php index 4ab6c21a..5bd85338 100644 --- a/cron/cron.php +++ b/cron/cron.php @@ -105,7 +105,7 @@ logApp("Cron", "info", "Cron Started"); mysqli_query($mysqli, "TRUNCATE TABLE ticket_views"); // Clean-up shared items that have been used -mysqli_query($mysqli, "DELETE FROM shared_items WHERE item_views = item_view_limit"); +mysqli_query($mysqli, "DELETE FROM shared_items WHERE item_view_limit > 0 AND item_views >= item_view_limit"); // Clean-up shared items that have expired mysqli_query($mysqli, "DELETE FROM shared_items WHERE item_expire_at < NOW()");