Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(filter) apply second filter whatever the first #8200

Merged
merged 1 commit into from
Dec 30, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,14 @@
*/
$s_search = "";
// Display service problems
if ($o == "svcgridSG_pb" || $o == "svcOVSG_pb") {
if (substr($o, -3) === '_pb') {
$s_search .= " AND s.state != 0 AND s.state != 4 ";
}

// Display acknowledged services
if ($o == "svcgridSG_ack_1" || $o == "svcOVSG_ack_1") {
if (substr($o, -6) === '_ack_1') {
$s_search .= " AND s.acknowledged = '1' ";
}

} elseif (substr($o, -6) === '_ack_0') {
// Display not acknowledged services
if ($o == "svcgridSG_ack_0" || $o == "svcOVSG_ack_0") {
$s_search .= " AND s.state != 0 AND s.state != 4 AND s.acknowledged = 0 ";
}

Expand Down