From 09798494c3e32ef7c0958c681b2eccc846a3000c Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Sat, 8 Mar 2014 13:53:25 -0500 Subject: Add code to close pop-up window if error is encountered. --- config/suricata/suricata_rules_edit.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'config/suricata') diff --git a/config/suricata/suricata_rules_edit.php b/config/suricata/suricata_rules_edit.php index 491bda61..b61c2f3a 100644 --- a/config/suricata/suricata_rules_edit.php +++ b/config/suricata/suricata_rules_edit.php @@ -36,8 +36,14 @@ $suricatadir = SURICATADIR; if (isset($_GET['id']) && is_numericint($_GET['id'])) $id = htmlspecialchars($_GET['id']); -if (is_null($id)) +// If we were not passed a valid index ID, close the pop-up and exit +if (is_null($id)) { + echo ''; + echo ''; + echo ''; exit; +} if (!is_array($config['installedpackages']['suricata']['rule'])) { $config['installedpackages']['suricata']['rule'] = array(); -- cgit v1.2.3