diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-17 21:22:15 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-17 21:22:15 -0400 |
commit | 3321f53eb16bb7db6522ee571a1df97e2045c82d (patch) | |
tree | e149fdb4f7e70238a1c828d6c9c629442aa12cba | |
parent | 557b481600002561242fd8bca999905b391001e5 (diff) | |
download | pfsense-packages-3321f53eb16bb7db6522ee571a1df97e2045c82d.tar.gz pfsense-packages-3321f53eb16bb7db6522ee571a1df97e2045c82d.tar.bz2 pfsense-packages-3321f53eb16bb7db6522ee571a1df97e2045c82d.zip |
Replace PHP unlink() with pfSense unlink_if_exists().
-rwxr-xr-x | config/snort/snort_check_for_rule_updates.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index ebd1fd53..e801f5fd 100755 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -120,7 +120,7 @@ if ($etpro == "on") { $emergingthreats = "on"; $et_name = "Emerging Threats Pro"; $et_md5_remove = ET_DNLD_FILENAME . ".md5"; - @unlink("{$snortdir}/{$et_md5_remove}"); + unlink_if_exists("{$snortdir}/{$et_md5_remove}"); } else { $emergingthreats_filename = ET_DNLD_FILENAME; @@ -131,7 +131,7 @@ else { $emergingthreats_url .= "snort-" . ET_VERSION . "/"; $et_name = "Emerging Threats Open"; $et_md5_remove = ETPRO_DNLD_FILENAME . ".md5"; - @unlink("{$snortdir}/{$et_md5_remove}"); + unlink_if_exists("{$snortdir}/{$et_md5_remove}"); } /* Snort GPLv2 Community Rules filenames and URL */ @@ -423,7 +423,7 @@ safe_mkdir("{$snortiprepdir}"); /* See if we need to automatically clear the Update Log based on 1024K size limit */ if (file_exists($snort_rules_upd_log)) { if (1048576 < filesize($snort_rules_upd_log)) - @unlink("{$snort_rules_upd_log}"); + unlink_if_exists("{$snort_rules_upd_log}"); } /* Log start time for this rules update */ |