mirror of
https://github.com/itflow-org/itflow
synced 2026-03-04 04:44:51 +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'])) {
|
if (isset($_GET['category'])) {
|
||||||
$category = sanitizeInput($_GET['category']);
|
$category = intval($_GET['category']);
|
||||||
if ($category == 'empty') {
|
$category_snippet = "AND ticket_category = $category";
|
||||||
$category_snippet = "AND ticket_category = 0 ";
|
|
||||||
} elseif ($category == 'all') {
|
|
||||||
$category_snippet = '';
|
|
||||||
} else {
|
|
||||||
$category_snippet = "AND ticket_category = " . $category;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$category_snippet = '';
|
$category_snippet = '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user