From e8a3309822105330311ea995bf9a2468861cc4b6 Mon Sep 17 00:00:00 2001 From: wrongecho Date: Thu, 26 Jun 2025 13:13:25 +0100 Subject: [PATCH] Fix project search not filtering completed projects --- projects.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/projects.php b/projects.php index d7236048..7e44cac9 100644 --- a/projects.php +++ b/projects.php @@ -23,17 +23,12 @@ if (!empty($client_access_string)) { $project_permission_snippet = "AND project_client_id IN ($client_access_string) OR project_client_id = 0"; } -// Status Query - -$status = 0; - -if (isset($_GET['status'])) { - $status = intval($_GET['status']); -} - -if ($status == 1) { +// Project Completed Status Query +if (isset($_GET['status']) && $_GET['status'] == 1) { + $status = 1; // Closed $status_query = "IS NOT NULL"; } else { + $status = 0; // Open $status_query = "IS NULL"; } @@ -73,6 +68,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); +