Commit 811cf082 authored by Franco Fichtner's avatar Franco Fichtner

src: prune comments and correct misalignments

parent 77578606
......@@ -2812,10 +2812,7 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven
mwexec("/sbin/ifconfig " . escapeshellarg($realhwif) .
" link " . escapeshellarg($wancfg['spoofmac']));
/*
* All vlans need to spoof their parent mac address, too. see
* ticket #1514: http://cvstrac.pfsense.com/tktview?tn=1514,33
*/
/* All vlans need to spoof their parent mac address, too. */
if (isset($config['vlans']['vlan'])) {
foreach ($config['vlans']['vlan'] as $vlan) {
if ($vlan['if'] == $realhwif) {
......
......@@ -42,12 +42,7 @@ function dump_rrd_to_xml($rrddatabase, $xmldumpfile)
return($dumpret);
}
/* This xml 2 array function is courtesy of the php.net comment section on xml_parse.
* it is roughly 4 times faster then our existing pfSense parser but due to the large
* size of the RRD xml dumps this is required.
* The reason we do not use it for pfSense is that it does not know about array fields
* which causes it to fail on array fields with single items. Possible Todo?
*/
/* This xml 2 array function is courtesy of the php.net comment section on xml_parse. */
function xml2array($contents, $get_attributes = 1, $priority = 'tag')
{
if (!function_exists('xml_parser_create'))
......
......@@ -92,11 +92,6 @@ function relayd_configure($kill_first = false)
$fd = fopen('/var/etc/relayd.conf', 'w');
$conf = "log updates \n";
/* Global timeout, interval and prefork settings
if not specified by the user:
- use a 1000 ms timeout value as in pfsense 2.0.1 and above
- leave interval and prefork empty, relayd will use its default values */
if (!empty($setting['timeout'])) {
$conf .= "timeout ".$setting['timeout']." \n";
} else {
......
......@@ -115,7 +115,6 @@ function rrd_data_xml() {
return $result;
}
function restore_rrddata() {
global $config;
foreach($config['rrddata']['rrddatafile'] as $rrd) {
......@@ -135,7 +134,7 @@ function restore_rrddata() {
}
unlink($xml_file);
} elseif (!empty($rrd['data'])) {
// pfSense 2.0 rrd backup format
/* rrd backup format */
$rrd_file = "/var/db/rrd/{$rrd['filename']}";
$rrd_fd = fopen($rrd_file, "w");
if (!$rrd_fd) {
......@@ -314,8 +313,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (count($input_errors) == 0) {
if(stristr($data, "<m0n0wall>")) {
log_error('Upgrading m0n0wall configuration to OPNsense.');
/* m0n0wall was found in config. convert it. */
$data = str_replace("m0n0wall", "pfsense", $data);
$data = str_replace('m0n0wall', 'opnsense', $data);
$m0n0wall_upgrade = true;
}
if (!empty($_POST['restorearea'])) {
......
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