From cf609e2e6acd9f6a77369be26a0a9932e53298cb Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 5 Jan 2021 09:12:02 +0100 Subject: [PATCH] src: small style update --- src/etc/rc.filter_synchronize | 2 +- src/sbin/pluginctl | 2 +- src/www/guiconfig.inc | 4 ++-- src/www/interfaces_lagg_edit.php | 2 +- src/www/status_habackup.php | 2 +- src/www/status_interfaces.php | 2 +- src/www/system_gateway_groups_edit.php | 2 +- src/www/system_usermanager.php | 2 +- src/www/vpn_ipsec.php | 2 +- src/www/vpn_ipsec_phase1.php | 2 +- src/www/vpn_ipsec_phase2.php | 2 +- src/www/vpn_openvpn_csc.php | 4 ++-- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/etc/rc.filter_synchronize b/src/etc/rc.filter_synchronize index f276628f1..2bb40219d 100755 --- a/src/etc/rc.filter_synchronize +++ b/src/etc/rc.filter_synchronize @@ -70,7 +70,7 @@ function get_vip_config_section(): array * @param boolean $debug enable debug output * @return boolean */ -function carp_check_version($url, $username, $password, $debug=false) +function carp_check_version($url, $username, $password, $debug = false) { $client = new SimpleXMLRPC_Client($url, 240); $client->debug = $debug; diff --git a/src/sbin/pluginctl b/src/sbin/pluginctl index 885e3cc4f..0b7b53f79 100755 --- a/src/sbin/pluginctl +++ b/src/sbin/pluginctl @@ -39,7 +39,7 @@ require_once 'auth.inc'; /** * retrieve config property by path (e.g. system.firmware), return simple type or json */ -function get_config_prop($path, $cnf=null) +function get_config_prop($path, $cnf = null) { global $config; $cnf = $cnf === null ? $config : $cnf; diff --git a/src/www/guiconfig.inc b/src/www/guiconfig.inc index 402cb3248..45343d637 100644 --- a/src/www/guiconfig.inc +++ b/src/www/guiconfig.inc @@ -303,7 +303,7 @@ function get_std_save_message($plain = false) } } -function get_specialnets($only_enabled=false) +function get_specialnets($only_enabled = false) { $specialnets = array(); $specialnets["any"] = gettext("any"); @@ -411,7 +411,7 @@ function address_to_pconfig($adr, &$padr, &$pmask, &$pnot, &$pbeginport, &$pendp } } -function pconfig_to_address(&$adr, $padr, $pmask, $pnot=false, $pbeginport=0, $pendport=0) +function pconfig_to_address(&$adr, $padr, $pmask, $pnot = false, $pbeginport = 0, $pendport = 0) { $adr = array(); if ($padr == "any") { diff --git a/src/www/interfaces_lagg_edit.php b/src/www/interfaces_lagg_edit.php index 1a678a965..7bf90455c 100644 --- a/src/www/interfaces_lagg_edit.php +++ b/src/www/interfaces_lagg_edit.php @@ -36,7 +36,7 @@ require_once("interfaces.inc"); * @param null $selected_id selected item index * @return array */ -function available_interfaces($selected_id=null) +function available_interfaces($selected_id = null) { global $config; // configured interfaces diff --git a/src/www/status_habackup.php b/src/www/status_habackup.php index cfb23609c..1335dfdd9 100644 --- a/src/www/status_habackup.php +++ b/src/www/status_habackup.php @@ -29,7 +29,7 @@ require_once("guiconfig.inc"); require_once("XMLRPC_Client.inc") ; -function xmlrpc_exec($method, $params=array(), $debug=false) +function xmlrpc_exec($method, $params = [], $debug = false) { global $config; $synchronizeto = null; diff --git a/src/www/status_interfaces.php b/src/www/status_interfaces.php index 4c6dd0472..8a9ecc535 100644 --- a/src/www/status_interfaces.php +++ b/src/www/status_interfaces.php @@ -87,7 +87,7 @@ include("head.inc"); + $first_row = false; ?> ">
diff --git a/src/www/system_gateway_groups_edit.php b/src/www/system_gateway_groups_edit.php index f7509c44e..0b25fe820 100644 --- a/src/www/system_gateway_groups_edit.php +++ b/src/www/system_gateway_groups_edit.php @@ -40,7 +40,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { } elseif (isset($_GET['dup']) && isset($a_gateway_groups[$_GET['dup']])) { $configId = $_GET['dup']; } - $pconfig=array(); + $pconfig = []; if (isset($configId)) { $pconfig['name'] = $a_gateway_groups[$configId]['name']; $pconfig['item'] = &$a_gateway_groups[$configId]['item']; diff --git a/src/www/system_usermanager.php b/src/www/system_usermanager.php index a3664431d..b43fd56f7 100644 --- a/src/www/system_usermanager.php +++ b/src/www/system_usermanager.php @@ -486,7 +486,7 @@ $( document ).ready(function() { event.preventDefault(); const url="system_usermanager_import_ldap.php"; var oWin = window.open(url,"OPNsense","width=620,height=400,top=150,left=150,scrollbars=yes"); - if (oWin==null || typeof(oWin)=="undefined") { + if (oWin == null || typeof(oWin) == "undefined") { alert(""); } }); diff --git a/src/www/vpn_ipsec.php b/src/www/vpn_ipsec.php index 60ad4e340..26f166dcb 100644 --- a/src/www/vpn_ipsec.php +++ b/src/www/vpn_ipsec.php @@ -391,7 +391,7 @@ $( document ).ready(function() { - "IKE", "ikev2" => "IKEv2", "ike" => "auto"); ?> + 'IKE', 'ikev2' => 'IKEv2', 'ike' => 'auto'); ?> diff --git a/src/www/vpn_ipsec_phase1.php b/src/www/vpn_ipsec_phase1.php index ba8e0e857..14228e6a0 100644 --- a/src/www/vpn_ipsec_phase1.php +++ b/src/www/vpn_ipsec_phase1.php @@ -148,7 +148,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { /* mobile client */ if (isset($_GET['mobile'])) { - $pconfig['mobile']=true; + $pconfig['mobile'] = true; } // init empty foreach (explode(",", $phase1_fields) as $fieldname) { diff --git a/src/www/vpn_ipsec_phase2.php b/src/www/vpn_ipsec_phase2.php index 2ad545658..1fac51113 100644 --- a/src/www/vpn_ipsec_phase2.php +++ b/src/www/vpn_ipsec_phase2.php @@ -191,7 +191,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { /* mobile client */ if (isset($_GET['mobile'])) { - $pconfig['mobile']=true; + $pconfig['mobile'] = true; } // init empty foreach (explode(",", $phase2_fields) as $fieldname) { diff --git a/src/www/vpn_openvpn_csc.php b/src/www/vpn_openvpn_csc.php index 5ecb43437..5f1f27528 100644 --- a/src/www/vpn_openvpn_csc.php +++ b/src/www/vpn_openvpn_csc.php @@ -39,9 +39,9 @@ $all_form_fields = "custom_options,disable,common_name,block,description ,wins_server2,ovpn_servers"; $a_csc = &config_read_array('openvpn', 'openvpn-csc'); - $vpnid = 0; -$act=null; +$act = null; + if ($_SERVER['REQUEST_METHOD'] === 'GET') { $pconfig = array(); if (isset($_GET['dup']) && isset($a_csc[$_GET['dup']])) {