summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2011-05-25 19:42:48 -0400
committerScott Ullrich <sullrich@pfsense.org>2011-05-25 19:43:51 -0400
commitd65962a7736ae9917182007f4ee0862193fc910f (patch)
treede515187848b3ebba4451006fb8b3564e7563866 /usr/local/www/firewall_rules_edit.php
parent838e4eb8762a000509cf98e3bd5e2a2cceac06ff (diff)
downloadpfsense-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 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index c051518..d673df8 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -401,6 +401,9 @@ if ($_POST) {
$input_errors[] = gettext("If you specify TCP flags that should be set you should specify out of which flags as well.");
}
+ // Allow extending of the firewall edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/input_validation");
+
if (!$input_errors) {
$filterent = array();
$filterent['id'] = $_POST['ruleid']>0?$_POST['ruleid']:'';
@@ -554,6 +557,10 @@ if ($_POST) {
}
filter_rules_sort();
+
+ // Allow extending of the firewall edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_write_config");
+
write_config();
mark_subsystem_dirty('filter');
@@ -596,6 +603,10 @@ include("head.inc");
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Firewall rule");?></td>
</tr>
+<?php
+ // Allow extending of the firewall edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/htmlphpearly");
+?>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Action");?></td>
<td width="78%" class="vtable">
@@ -1381,6 +1392,10 @@ include("head.inc");
</div>
</td>
</tr>
+<?php
+ // Allow extending of the firewall edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/htmlphplate");
+?>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
OpenPOWER on IntegriCloud