mirror of https://github.com/itflow-org/itflow
Simplify Category filter logic in tickets catrgory is an int not a string duh
This commit is contained in:
parent
08e467baa9
commit
4e76ceaa0f
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 = '';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue