aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-03-08 13:53:25 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2014-03-08 13:53:25 -0500
commit09798494c3e32ef7c0958c681b2eccc846a3000c (patch)
tree33727d805efa0c9ab45d032f2b0ae97292a37fef /config
parent3bd710acc08252498e46e5c5d8608a3c6fbd122f (diff)
downloadpfsense-packages-09798494c3e32ef7c0958c681b2eccc846a3000c.tar.gz
pfsense-packages-09798494c3e32ef7c0958c681b2eccc846a3000c.tar.bz2
pfsense-packages-09798494c3e32ef7c0958c681b2eccc846a3000c.zip
Add code to close pop-up window if error is encountered.
Diffstat (limited to 'config')
-rw-r--r--config/suricata/suricata_rules_edit.php8
1 files changed, 7 insertions, 1 deletions
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 '<html><body link="#000000" vlink="#000000" alink="#000000">';
+ echo '<script language="javascript" type="text/javascript">';
+ echo 'window.close();</script>';
+ echo '</body></html>';
exit;
+}
if (!is_array($config['installedpackages']['suricata']['rule'])) {
$config['installedpackages']['suricata']['rule'] = array();