diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2011-05-25 19:42:48 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2011-05-25 19:43:51 -0400 |
commit | d65962a7736ae9917182007f4ee0862193fc910f (patch) | |
tree | de515187848b3ebba4451006fb8b3564e7563866 /etc/inc | |
parent | 838e4eb8762a000509cf98e3bd5e2a2cceac06ff (diff) | |
download | pfsense-d65962a7736ae9917182007f4ee0862193fc910f.zip pfsense-d65962a7736ae9917182007f4ee0862193fc910f.tar.gz |
Adding a new hook system for firewall nat edit and firewall rules edit page.
Basically if the directory exists it will suck in the files to extend these pags.
/usr/local/pkg/firewall_nat/input_validation
/usr/local/pkg/firewall_nat/pre_write_config
/usr/local/pkg/firewall_nat/htmlphpearly
/usr/local/pkg/firewall_nat/htmlphplate
/usr/local/pkg/firewall_rules/input_validation
/usr/local/pkg/firewall_rules/pre_write_config
/usr/local/pkg/firewall_rules/htmlphpearly
/usr/local/pkg/firewall_rules/htmlphplate
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index a673685..6241a1e 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -2224,4 +2224,17 @@ function is_ipaddr_configured($ipaddr) { } } +function pfSense_handle_custom_code($src_dir) { + // Allow extending of the nat edit page and include custom input validation + if(is_dir("$src_dir")) { + $cf = glob($src_dir); + foreach($cf as $nf) { + if($nf == "." || $nf == "..") + continue; + // Include the extra handler + include("$src_dir/$nf"); + } + } +} + ?>
\ No newline at end of file |