Commit 2f00e12e authored by Franco Fichtner's avatar Franco Fichtner

src: a good opportunity to sneak in a whitespace sweep

parent bd42061f
......@@ -68,4 +68,3 @@ class XMLRPCServer
return $server;
}
}
......@@ -286,4 +286,3 @@ function backup_config_section_xmlrpc($sectionKeys)
return array_intersect_key($config, array_flip($sectionKeys));
}
}
......@@ -90,7 +90,7 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
return;
}
$client = new SimpleXMLRPC_Client($url,240);
$client->setCredentials($username, $password);
if ($client->query($method)) {
......@@ -98,9 +98,9 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
} else {
// propagate error to log
$error = "An error occurred while attempting XMLRPC sync with username {$username} and {$url} " . $client->error ;
log_error($error);
log_error($error);
file_notice("sync_settings", $error, "Settings Sync", "");
// print communication details on failure
// print communication details on failure
echo $client->getDetails();
return false ;
}
......@@ -111,7 +111,7 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
file_notice("sync_settings", $error, "Settings Sync", "");
exit;
}
if (!isset($remote_version['config_version']) ||
$remote_version['config_version'] < $config['version']) {
update_filter_reload_status("The other member is on older configuration version of {$g['product_name']}. Sync will not be done to prevent problems!");
......@@ -120,7 +120,7 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
} else {
return true;
}
}
function carp_sync_xml($url, $username, $password, $sections, $method = 'opnsense.restore_config_section') {
......@@ -226,13 +226,13 @@ function carp_sync_xml($url, $username, $password, $sections, $method = 'opnsens
} else {
// propagate error to log
$error = "An error occurred while attempting XMLRPC sync with username {$username} and {$url} " . $client->error ;
log_error($error);
log_error($error);
file_notice("sync_settings", $error, "Settings Sync", "");
// print communication details on failure
// print communication details on failure
echo $client->getDetails();
return false ;
}
if (!is_array($response) && trim($response) == "Authentication failed") {
$error = "An authentication failure occurred while trying to access {$url} ({$method}).";
log_error($error);
......@@ -382,7 +382,7 @@ if (is_array($config['hasync'])) {
if (count($argv) <= 1 || $argv[1] != 'restart' ) {
// only sync data, no reload
// TODO: config sync probably needs more thinking, but when we always force a reload
// TODO: config sync probably needs more thinking, but when we always force a reload
// TODO: the machine tends to get sloppy
exit;
}
......@@ -393,9 +393,9 @@ if (is_array($config['hasync'])) {
} else {
// propagate error to log
$error = "An error occurred while attempting XMLRPC sync with username {$username} and {$url} " . $client->error ;
log_error($error);
log_error($error);
file_notice("sync_settings", $error, "Settings Sync", "");
// print communication details on failure
// print communication details on failure
echo $client->getDetails();
return false ;
}
......
......@@ -362,7 +362,7 @@ class IXR_Server
{
if (!$data) {
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') {
header('Content-Type: text/plain'); // merged from WP #9093
header('Content-Type: text/plain'); // merged from WP #9093
die('XML-RPC server accepts POST requests only.');
}
......@@ -679,11 +679,11 @@ class IXR_Client
$gettingHeaders = false;
}
if (!$gettingHeaders) {
// merged from WP #12559 - remove trim
// merged from WP #12559 - remove trim
$contents .= $line;
}
if ($this->debug) {
$debugContents .= $line;
$debugContents .= $line;
}
}
if ($this->debug) {
......
......@@ -172,4 +172,3 @@ maxheight: define max height of select box, default=170px to hold 5 items
'activetab':'proxy-general'
])
}}
......@@ -21,4 +21,3 @@ command:/usr/local/etc/rc.filter_synchronize
parameters:%s
type:script
message:Syncing firewall %s
......@@ -103,7 +103,7 @@ if ($_POST) {
if (is_ipaddr_configured($_POST['subnet'], $ignore_if)) {
$input_errors[] = gettext("This IP address is being used by another interface or VIP.");
}
unset($ignore_if);
}
}
......
......@@ -238,7 +238,7 @@ if ($_POST) {
$newvoucher = array();
} else {
$newvoucher = $config['voucher'][$cpzone];
}
}
if ($_POST['enable'] == "yes") {
$newvoucher['enable'] = true;
} else {
......
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