src: useless globals

This commit is contained in:
Franco Fichtner 2018-11-12 14:37:16 +01:00
parent df05b3e158
commit 6172beb8f4
3 changed files with 5 additions and 10 deletions

View File

@ -47,8 +47,6 @@ function return_dpinger_defaults()
function setup_gateways_monitor($verbose = false, $gwname = null)
{
global $config;
if ($verbose) {
echo 'Setting up gateway monitors...';
flush();

View File

@ -206,11 +206,11 @@ function next_unused_gateway_name($interface)
function add_gateway_to_config($interface, $gatewayip, $inet_type, $is_in_subnet)
{
global $config, $fp;
global $fp;
$label_IPvX = $inet_type == 'inet6' ? 'IPv6' : 'IPv4';
$a_gateways = &config_read_array('gateways', 'gateway_item');
$a_gateways = &config_read_array('gateways', 'gateway_item');
$is_default = true;
$new_name = '';

View File

@ -71,8 +71,6 @@ function filter_generate_port(& $rule, $target = "source", $isnat = false) {
function filter_generate_address(&$FilterIflist, &$rule, $target = 'source', $isnat = false)
{
global $config;
$src = '';
if (isset($rule[$target]['any'])) {
@ -228,7 +226,7 @@ function openvpn_client_export_validate_config($srvid, $usrid, $crtid)
function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifyservercn, $randomlocalport, $usetoken, $nokeys = false, $proxy, $expformat = "baseconf", $outpass = "", $skiptls=false, $doslines=false, $openvpnmanager, $advancedoptions = "")
{
global $config, $input_errors;
global $input_errors;
$nl = ($doslines) ? "\r\n" : "\n";
$conf = "";
@ -539,8 +537,6 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $useaddr, $verifyservercn, $randomlocalport, $usetoken, $outpass, $proxy, $openvpnmanager, $advancedoptions, $compression_type)
{
global $config;
$validconfig = openvpn_client_export_validate_config($srvid, $usrid, $crtid);
if (!$validconfig) {
return false;
@ -789,7 +785,8 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
}
}
function openvpn_client_export_build_remote_lines($settings, $useaddr, $interface, $expformat, $nl) {
function openvpn_client_export_build_remote_lines($settings, $useaddr, $interface, $expformat, $nl)
{
global $config;
$remotes = array();
if (($useaddr == "serveraddr") || ($useaddr == "servermagic") || ($useaddr == "servermagichost")) {