Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Portal Tickets - Adjust bad SQL query #929

Merged
merged 2 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions portal/ticket_view_all.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
}

// 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 '%'";
Expand Down
8 changes: 4 additions & 4 deletions portal/tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@


// 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 '%'";
Expand Down
Loading