mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Simplify Category filter logic in tickets catrgory is an int not a string duh
This commit is contained in:
10
tickets.php
10
tickets.php
@@ -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 = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user