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, ...@@ -2461,26 +2461,6 @@ function is_ipaddr_configured($ipaddr, $ignore_if = "", $check_localip = false,
return 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") { function set_language($lang = 'en_US', $encoding = "UTF-8") {
putenv("LANG={$lang}.{$encoding}"); putenv("LANG={$lang}.{$encoding}");
......
...@@ -199,9 +199,6 @@ include("head.inc"); ...@@ -199,9 +199,6 @@ include("head.inc");
<option value="" <?=$interfacefilter?"":"selected=\"selected\""?>>*Any interface</option> <option value="" <?=$interfacefilter?"":"selected=\"selected\""?>>*Any interface</option>
<?php <?php
$iflist = get_configured_interface_with_descr(false, true); $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) foreach ($iflist as $if => $ifdesc)
$interfaces[$if] = $ifdesc; $interfaces[$if] = $ifdesc;
......
...@@ -163,7 +163,6 @@ $main_buttons = array( ...@@ -163,7 +163,6 @@ $main_buttons = array(
<?php if (is_subsystem_dirty('aliases')): ?><p> <?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 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 endif; ?>
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases/pre_table"); ?>
<section class="col-xs-12"> <section class="col-xs-12">
......
...@@ -317,9 +317,6 @@ if ($_POST) { ...@@ -317,9 +317,6 @@ if ($_POST) {
unset($vertical_bar_err_text); 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) { if (!$input_errors) {
$alias['address'] = is_array($address) ? implode(" ", $address) : $address; $alias['address'] = is_array($address) ? implode(" ", $address) : $address;
$alias['descr'] = $_POST['descr']; $alias['descr'] = $_POST['descr'];
...@@ -356,8 +353,6 @@ if ($_POST) { ...@@ -356,8 +353,6 @@ if ($_POST) {
update_alias_names_upon_change(array('aliases', 'alias'), array('address'), $_POST['name'], $origname); 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 (isset($id) && $a_aliases[$id]) {
if ($a_aliases[$id]['name'] <> $alias['name']) { if ($a_aliases[$id]['name'] <> $alias['name']) {
foreach ($a_aliases as $aliasid => $aliasd) { foreach ($a_aliases as $aliasid => $aliasd) {
...@@ -609,7 +604,6 @@ EOD; ...@@ -609,7 +604,6 @@ EOD;
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <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); ?> <?php if ($input_errors) print_input_errors($input_errors); ?>
<div id="inputerrors"></div> <div id="inputerrors"></div>
...@@ -654,7 +648,6 @@ EOD; ...@@ -654,7 +648,6 @@ EOD;
</span> </span>
</td> </td>
</tr> </tr>
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/after_first_tr"); ?>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
......
...@@ -58,8 +58,6 @@ if ($_POST) { ...@@ -58,8 +58,6 @@ if ($_POST) {
$retval |= filter_configure(); $retval |= filter_configure();
$savemsg = get_std_save_message($retval); $savemsg = get_std_save_message($retval);
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/apply");
if ($retval == 0) { if ($retval == 0) {
clear_subsystem_dirty('natconf'); clear_subsystem_dirty('natconf');
clear_subsystem_dirty('filter'); clear_subsystem_dirty('filter');
......
...@@ -297,9 +297,6 @@ if ($_POST) { ...@@ -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) { if (!$input_errors) {
$natent = array(); $natent = array();
...@@ -416,9 +413,6 @@ if ($_POST) { ...@@ -416,9 +413,6 @@ if ($_POST) {
$natent['updated'] = make_config_revision_entry(); $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 // Update the NAT entry now
if (isset($id) && $a_nat[$id]) if (isset($id) && $a_nat[$id])
$a_nat[$id] = $natent; $a_nat[$id] = $natent;
...@@ -472,10 +466,6 @@ include("head.inc"); ...@@ -472,10 +466,6 @@ include("head.inc");
<tr> <tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Redirect entry"); ?></td> <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Redirect entry"); ?></td>
</tr> </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> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
...@@ -499,8 +489,6 @@ include("head.inc"); ...@@ -499,8 +489,6 @@ include("head.inc");
<?php <?php
$iflist = get_configured_interface_with_descr(false, true); $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) foreach ($iflist as $if => $ifdesc)
if(have_ruleint_access($if)) if(have_ruleint_access($if))
$interfaces[$if] = $ifdesc; $interfaces[$if] = $ifdesc;
...@@ -871,10 +859,6 @@ include("head.inc"); ...@@ -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.")?> <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> </td>
</tr><?php endif; ?> </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 <?php
$has_created_time = (isset($a_nat[$id]['created']) && is_array($a_nat[$id]['created'])); $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'])); $has_updated_time = (isset($a_nat[$id]['updated']) && is_array($a_nat[$id]['updated']));
......
...@@ -234,9 +234,6 @@ if ($_POST) { ...@@ -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) { if (!$input_errors) {
$natent = array(); $natent = array();
$natent['source']['network'] = $osn; $natent['source']['network'] = $osn;
...@@ -304,9 +301,6 @@ if ($_POST) { ...@@ -304,9 +301,6 @@ if ($_POST) {
$natent['updated'] = make_config_revision_entry(); $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]) { if (isset($id) && $a_out[$id]) {
$a_out[$id] = $natent; $a_out[$id] = $natent;
} else { } else {
...@@ -448,10 +442,6 @@ function poolopts_change() { ...@@ -448,10 +442,6 @@ function poolopts_change() {
<tr> <tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Advanced Outbound NAT entry");?></td> <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Advanced Outbound NAT entry");?></td>
</tr> </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> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled");?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled");?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
...@@ -838,8 +828,6 @@ function poolopts_change() { ...@@ -838,8 +828,6 @@ function poolopts_change() {
<?php <?php
endif; endif;
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> <tr>
<td width="22%" valign="top">&nbsp;</td> <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