diff options
author | Ermal <eri@pfsense.org> | 2011-09-05 07:34:52 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-09-05 07:34:52 +0000 |
commit | d0e3555d5741960af91a0ebe504faddc31bea381 (patch) | |
tree | 903b9dd996d4acbaece0dc56b27c6f9c4bb97cba /config | |
parent | aec17e083fc10dfb96bcba44badc108e5ba8c462 (diff) | |
download | pfsense-packages-d0e3555d5741960af91a0ebe504faddc31bea381.tar.gz pfsense-packages-d0e3555d5741960af91a0ebe504faddc31bea381.tar.bz2 pfsense-packages-d0e3555d5741960af91a0ebe504faddc31bea381.zip |
Add function in case it is not declared so the editing works correctly
Diffstat (limited to 'config')
-rw-r--r-- | config/snort/snort_rules_edit.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/config/snort/snort_rules_edit.php b/config/snort/snort_rules_edit.php index 266750fa..330630f4 100644 --- a/config/snort/snort_rules_edit.php +++ b/config/snort/snort_rules_edit.php @@ -86,6 +86,16 @@ if (strstr($splitcontents[$lineid], $findme)) if ($highlight == "no") $splitcontents[$lineid] = substr($splitcontents[$lineid], 2); +if (!function_exists('get_middle')) { + function get_middle($source, $beginning, $ending, $init_pos) { + $beginning_pos = strpos($source, $beginning, $init_pos); + $middle_pos = $beginning_pos + strlen($beginning); + $ending_pos = strpos($source, $ending, $beginning_pos); + $middle = substr($source, $middle_pos, $ending_pos - $middle_pos); + return $middle; + } +} + if ($_POST) { if ($_POST['save']) { |