Commit 50778390 authored by Ad Schellevis's avatar Ad Schellevis

remove package hook pfSense_handle_custom_code

parent 7f23acc9
......@@ -2461,26 +2461,6 @@ function is_ipaddr_configured($ipaddr, $ignore_if = "", $check_localip = false,
return false;
}
/****f* legacy/pfSense_handle_custom_code
* NAME
* pfSense_handle_custom_code
* INPUTS
* directory name to process
* RESULT
* globs the directory and includes the files
*/
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 . "/*.inc");
foreach($cf as $nf) {
if($nf == "." || $nf == "..")
continue;
// Include the extra handler
include("$nf");
}
}
}
function set_language($lang = 'en_US', $encoding = "UTF-8") {
putenv("LANG={$lang}.{$encoding}");
......
......@@ -199,9 +199,6 @@ include("head.inc");
<option value="" <?=$interfacefilter?"":"selected=\"selected\""?>>*Any interface</option>
<?php
$iflist = get_configured_interface_with_descr(false, true);
//$iflist = get_interface_list();
// Allow extending of the firewall edit interfaces
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
foreach ($iflist as $if => $ifdesc)
$interfaces[$if] = $ifdesc;
......
......@@ -163,7 +163,6 @@ $main_buttons = array(
<?php if (is_subsystem_dirty('aliases')): ?><p>
<?php print_info_box_np(gettext("The alias list has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));?>
<?php endif; ?>
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases/pre_table"); ?>
<section class="col-xs-12">
......
......@@ -317,9 +317,6 @@ if ($_POST) {
unset($vertical_bar_err_text);
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/input_validation");
if (!$input_errors) {
$alias['address'] = is_array($address) ? implode(" ", $address) : $address;
$alias['descr'] = $_POST['descr'];
......@@ -356,8 +353,6 @@ if ($_POST) {
update_alias_names_upon_change(array('aliases', 'alias'), array('address'), $_POST['name'], $origname);
}
pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/pre_write_config");
if (isset($id) && $a_aliases[$id]) {
if ($a_aliases[$id]['name'] <> $alias['name']) {
foreach ($a_aliases as $aliasid => $aliasd) {
......@@ -609,7 +604,6 @@ EOD;
<div class="container-fluid">
<div class="row">
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/pre_input_errors"); ?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div id="inputerrors"></div>
......@@ -654,7 +648,6 @@ EOD;
</span>
</td>
</tr>
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/after_first_tr"); ?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
......
......@@ -58,8 +58,6 @@ if ($_POST) {
$retval |= filter_configure();
$savemsg = get_std_save_message($retval);
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/apply");
if ($retval == 0) {
clear_subsystem_dirty('natconf');
clear_subsystem_dirty('filter');
......
......@@ -297,9 +297,6 @@ if ($_POST) {
}
}
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/input_validation");
if (!$input_errors) {
$natent = array();
......@@ -416,9 +413,6 @@ if ($_POST) {
$natent['updated'] = make_config_revision_entry();
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_write_config");
// Update the NAT entry now
if (isset($id) && $a_nat[$id])
$a_nat[$id] = $natent;
......@@ -472,10 +466,6 @@ include("head.inc");
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Redirect entry"); ?></td>
</tr>
<?php
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/htmlphpearly");
?>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
......@@ -499,8 +489,6 @@ include("head.inc");
<?php
$iflist = get_configured_interface_with_descr(false, true);
// Allow extending of the firewall edit interfaces
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
foreach ($iflist as $if => $ifdesc)
if(have_ruleint_access($if))
$interfaces[$if] = $ifdesc;
......@@ -871,10 +859,6 @@ include("head.inc");
<br /><br /><?=gettext("NOTE: The \"pass\" selection does not work properly with Multi-WAN. It will only work on an interface containing the default gateway.")?>
</td>
</tr><?php endif; ?>
<?php
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/htmlphplate");
?>
<?php
$has_created_time = (isset($a_nat[$id]['created']) && is_array($a_nat[$id]['created']));
$has_updated_time = (isset($a_nat[$id]['updated']) && is_array($a_nat[$id]['updated']));
......
......@@ -234,9 +234,6 @@ if ($_POST) {
}
}
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/input_validation");
if (!$input_errors) {
$natent = array();
$natent['source']['network'] = $osn;
......@@ -304,9 +301,6 @@ if ($_POST) {
$natent['updated'] = make_config_revision_entry();
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/pre_write_config");
if (isset($id) && $a_out[$id]) {
$a_out[$id] = $natent;
} else {
......@@ -448,10 +442,6 @@ function poolopts_change() {
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Advanced Outbound NAT entry");?></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("Disabled");?></td>
<td width="78%" class="vtable">
......@@ -838,8 +828,6 @@ function poolopts_change() {
<?php
endif;
endif;
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/htmlphplate");
?>
<tr>
<td width="22%" valign="top">&nbsp;</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment