diff options
author | Ermal <eri@pfsense.org> | 2011-08-03 15:43:43 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-08-03 15:43:43 +0000 |
commit | 8c0fcc9d45f382d5f171adaf5bba112b0172d566 (patch) | |
tree | cf91743acb85e4053a3ed65173df8b635d888848 /config/snort/snort_interfaces_edit.php | |
parent | 2e06535daadd598e700b5619ca08d935bd97146a (diff) | |
download | pfsense-packages-8c0fcc9d45f382d5f171adaf5bba112b0172d566.tar.gz pfsense-packages-8c0fcc9d45f382d5f171adaf5bba112b0172d566.tar.bz2 pfsense-packages-8c0fcc9d45f382d5f171adaf5bba112b0172d566.zip |
Another round of fixes for whitelist and suppress. Also correct behaviour of some GUI.
Diffstat (limited to 'config/snort/snort_interfaces_edit.php')
-rw-r--r-- | config/snort/snort_interfaces_edit.php | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/config/snort/snort_interfaces_edit.php b/config/snort/snort_interfaces_edit.php index a67ba2ac..019a8af0 100644 --- a/config/snort/snort_interfaces_edit.php +++ b/config/snort/snort_interfaces_edit.php @@ -648,24 +648,19 @@ function enable_change(enable_change) { class="formfld" id="suppresslistname"> <?php /* find whitelist names and filter by type, make sure to track by uuid */ - $slist_select = $config['installedpackages']['snortglobal']['suppress']['item']; - $sid = -1; if ($pconfig['suppresslistname'] == 'default'){ $selected = 'selected'; } - preg_match('/^([a-zA-z0-9]+)/', $pconfig['suppresslistname'], $slist_sub); - echo "<option value=\"default\" $selected>default</option> - "; - foreach ($slist_select as $value): - $sid += 1; - $ilistname = $config['installedpackages']['snortglobal']['suppress']['item'][$sid]['name']; - $suppress_uuid = $config['installedpackages']['snortglobal']['suppress']['item'][$sid]['uuid']; - if ($ilistname == $slist_sub[0]){ - echo "<option value=\"$ilistname $suppress_uuid\" selected>"; - }else{ - echo "<option value=\"$ilistname $suppress_uuid\">"; + echo "<option value=\"default\" $selected>default</option>"; + if (is_array($config['installedpackages']['snortglobal']['suppress']['item'])) { + $slist_select = $config['installedpackages']['snortglobal']['suppress']['item']; + foreach ($slist_select as $value) { + $ilistname = $value['name']; + if ($ilistname == $pconfig['suppresslistname']) + echo "<option value='$ilistname' selected>"; + else + echo "<option value='$ilistname'>"; + echo htmlspecialchars($ilistname) . '</option>'; + } } - echo htmlspecialchars($ilistname) . '</option> - '; - endforeach; ?> </select><br> <span class="vexpl">Choose the suppression or filtering file you |