diff options
author | Chris Buechler <cmb@pfsense.org> | 2013-04-25 20:35:30 -0700 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2013-04-25 20:35:30 -0700 |
commit | 2ab6e945f41e4c9ae915c4e72de81c70f3835bbf (patch) | |
tree | e5e715e5eb7359dcd483fc519970c71fd0657cb7 /config/snort/snort_rulesets.php | |
parent | a5c7adf6e873e3b5248c57b99232478ccf21bf52 (diff) | |
parent | a101dddc6796ba2e98645ea326bb87a529b8d19d (diff) | |
download | pfsense-packages-2ab6e945f41e4c9ae915c4e72de81c70f3835bbf.tar.gz pfsense-packages-2ab6e945f41e4c9ae915c4e72de81c70f3835bbf.tar.bz2 pfsense-packages-2ab6e945f41e4c9ae915c4e72de81c70f3835bbf.zip |
Merge pull request #433 from bmeeks8/master
Snort Packge Update to ver 2.5.7 - Bug fixes and new features
Diffstat (limited to 'config/snort/snort_rulesets.php')
-rwxr-xr-x | config/snort/snort_rulesets.php | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/config/snort/snort_rulesets.php b/config/snort/snort_rulesets.php index 1bf815fb..64998810 100755 --- a/config/snort/snort_rulesets.php +++ b/config/snort/snort_rulesets.php @@ -82,8 +82,10 @@ if (($snortdownload == 'off') || ($a_nat[$id]['ips_policy_enable'] != 'on')) $policy_select_disable = "disabled"; if ($a_nat[$id]['autoflowbitrules'] == 'on') { - if (file_exists("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$flowbit_rules_file}")) + if (file_exists("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$flowbit_rules_file}") && + filesize("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$flowbit_rules_file}") > 0) { $btn_view_flowb_rules = ""; + } else $btn_view_flowb_rules = " disabled"; } @@ -220,6 +222,22 @@ function popup(url) if (window.focus) {newwin.focus()} return false; } + +function wopen(url, name, w, h) +{ +// Fudge factors for window decoration space. +// In my tests these work well on all platforms & browsers. +w += 32; +h += 96; + var win = window.open(url, + name, + 'width=' + w + ', height=' + h + ', ' + + 'location=no, menubar=no, ' + + 'status=no, toolbar=no, scrollbars=yes, resizable=yes'); + win.resizeTo(w, h); + win.focus(); +} + function enable_change() { var endis = !(document.iform.ips_policy_enable.checked); @@ -265,7 +283,10 @@ function enable_change() <tr> <td class="vexpl"><br/> <?php printf(gettext("# The rules directory is empty: %s%s/rules%s"), '<strong>',$snortdir,'</strong>'); ?> <br/><br/> - <?php printf(gettext("Please go to the %sUpdates%s tab to download the rules configured on the %sGlobal%s tab."),'<strong>' ,'</strong>', '<strong>' ,'</strong>'); ?> + <?php echo gettext("Please go to the ") . '<a href="snort_download_updates.php"><strong>' . gettext("Updates") . + '</strong></a>' . gettext(" tab to download the rules configured on the ") . + '<a href="snort_interfaces_global.php"><strong>' . gettext("Global") . + '</strong></a>' . gettext(" tab."); ?> </td> </tr> <?php else: @@ -302,7 +323,7 @@ function enable_change() </tr> <tr> <td width="15%" class="listn"><?php echo gettext("Auto Flowbit Rules"); ?></td> - <td width="85%"><input type="button" class="formbtn" value="View" onclick="popup('snort_rules_edit.php?id=<?=$id;?>&openruleset=<?=$flowbit_rules_file;?>')" <?php echo $btn_view_flowb_rules; ?>/> + <td width="85%"><input type="button" class="formbtn" value="View" onclick="wopen('snort_rules_edit.php?id=<?=$id;?>&openruleset=<?=$flowbit_rules_file;?>','FileViewer',800,600)" <?php echo $btn_view_flowb_rules; ?>/> <span class="vexpl"><?php echo gettext("Click to view auto-enabled rules required to satisfy flowbit dependencies"); ?></span></td> </tr> <tr> |