From d65962a7736ae9917182007f4ee0862193fc910f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 25 May 2011 19:42:48 -0400 Subject: 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 --- etc/inc/pfsense-utils.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'etc/inc') 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 -- cgit v1.1