Simplify Category filter logic in tickets catrgory is an int not a string duh

This commit is contained in:
johnnyq 2025-06-07 00:46:11 -04:00
parent 08e467baa9
commit 4e76ceaa0f
1 changed files with 2 additions and 8 deletions

View File

@ -56,14 +56,8 @@ if (isset($_GET['billable']) && ($_GET['billable']) == '1') {
}
if (isset($_GET['category'])) {
$category = sanitizeInput($_GET['category']);
if ($category == 'empty') {
$category_snippet = "AND ticket_category = 0 ";
} elseif ($category == 'all') {
$category_snippet = '';
} else {
$category_snippet = "AND ticket_category = " . $category;
}
$category = intval($_GET['category']);
$category_snippet = "AND ticket_category = $category";
} else {
$category_snippet = '';
}