From 940fc8ef690512f5d0da6c069eed37082d10b1ec Mon Sep 17 00:00:00 2001 From: frederik Date: Fri, 15 Mar 2024 16:00:05 +0100 Subject: [PATCH] fix: deleting detection did not delete the files due to incomplete path --- scripts/todays_detections.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/todays_detections.php b/scripts/todays_detections.php index 4c117ff..0aaabc0 100644 --- a/scripts/todays_detections.php +++ b/scripts/todays_detections.php @@ -177,13 +177,13 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) { $searchquery = ""; } if(isset($_GET['display_limit']) && is_numeric($_GET['display_limit'])){ - $statement0 = $db->prepare('SELECT Time, Com_Name, Sci_Name, Confidence, File_Name FROM detections WHERE Date == Date(\'now\', \'localtime\') '.$searchquery.' ORDER BY Time DESC LIMIT '.(intval($_GET['display_limit'])-40).',40'); + $statement0 = $db->prepare('SELECT Date, Time, Com_Name, Sci_Name, Confidence, File_Name FROM detections WHERE Date == Date(\'now\', \'localtime\') '.$searchquery.' ORDER BY Time DESC LIMIT '.(intval($_GET['display_limit'])-40).',40'); } else { // legacy mode if(isset($_GET['hard_limit']) && is_numeric($_GET['hard_limit'])) { - $statement0 = $db->prepare('SELECT Time, Com_Name, Sci_Name, Confidence, File_Name FROM detections WHERE Date == Date(\'now\', \'localtime\') '.$searchquery.' ORDER BY Time DESC LIMIT '.$_GET['hard_limit']); + $statement0 = $db->prepare('SELECT Date, Time, Com_Name, Sci_Name, Confidence, File_Name FROM detections WHERE Date == Date(\'now\', \'localtime\') '.$searchquery.' ORDER BY Time DESC LIMIT '.$_GET['hard_limit']); } else { - $statement0 = $db->prepare('SELECT Time, Com_Name, Sci_Name, Confidence, File_Name FROM detections WHERE Date == Date(\'now\', \'localtime\') '.$searchquery.' ORDER BY Time DESC'); + $statement0 = $db->prepare('SELECT Date, Time, Com_Name, Sci_Name, Confidence, File_Name FROM detections WHERE Date == Date(\'now\', \'localtime\') '.$searchquery.' ORDER BY Time DESC'); } }