mirror of https://github.com/itflow-org/itflow
Merge pull request #929 from wrongecho/portal-ticket-list-fix
Client Portal Tickets - Adjust bad SQL query that shows ticket subjects for other contacts
This commit is contained in:
commit
ed87ddc2dd
|
|
@ -13,13 +13,13 @@ if ($session_contact_primary == 0 && !$session_contact_is_technical_contact) {
|
|||
}
|
||||
|
||||
// Ticket status from GET
|
||||
if (!isset($_GET['status'])) {
|
||||
// If nothing is set, assume we only want to see open tickets
|
||||
if (!isset($_GET['status']) || ($_GET['status']) == 'Open') {
|
||||
// Default to showing open
|
||||
$status = 'Open';
|
||||
$ticket_status_snippet = "ticket_status != 5";
|
||||
$ticket_status_snippet = "ticket_closed_at IS NULL";
|
||||
} elseif (isset($_GET['status']) && ($_GET['status']) == 'Closed') {
|
||||
$status = 'Closed';
|
||||
$ticket_status_snippet = "ticket_status = 5";
|
||||
$ticket_status_snippet = "ticket_closed_at IS NOT NULL";
|
||||
} else {
|
||||
$status = '%';
|
||||
$ticket_status_snippet = "ticket_status LIKE '%'";
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ require_once "inc_portal.php";
|
|||
|
||||
|
||||
// Ticket status from GET
|
||||
if (!isset($_GET['status'])) {
|
||||
// If nothing is set, assume we only want to see open tickets
|
||||
if (!isset($_GET['status']) || ($_GET['status']) == 'Open') {
|
||||
// Default to showing open
|
||||
$status = 'Open';
|
||||
$ticket_status_snippet = "ticket_status != 5 AND ticket_status != 'Closed'";
|
||||
$ticket_status_snippet = "ticket_closed_at IS NULL";
|
||||
} elseif (isset($_GET['status']) && ($_GET['status']) == 'Closed') {
|
||||
$status = 'Closed';
|
||||
$ticket_status_snippet = "ticket_status = 5 OR ticket_status = 'Closed'";
|
||||
$ticket_status_snippet = "ticket_closed_at IS NOT NULL";
|
||||
} else {
|
||||
$status = '%';
|
||||
$ticket_status_snippet = "ticket_status LIKE '%'";
|
||||
|
|
|
|||
Loading…
Reference in New Issue