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