Remove unnecessary code
This commit is contained in:
parent
cf3d2c53eb
commit
0aaf8993c3
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
c7c6da0a4a4a7ac33f387ea178319bae ./ca_settings.page
|
||||
ed2883d6c44c19304c431079596a1731 ./default.cfg
|
||||
288739a1b459844068bcae9f69a04d5e ./include/exec.php
|
||||
f98f82a8da4af4b775b71d85a953f567 ./include/helpers.php
|
||||
dcac83839748f62d4e741a36f338d4f4 ./include/helpers.php
|
||||
d827ebdf8c29aa6a9818df043a37721e ./include/paths.php
|
||||
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
|
||||
b398273cf7daa62ab00d2de2336ca25f ./README.md
|
||||
|
@ -690,7 +690,6 @@ function getPortsInUse() {
|
||||
|
||||
$bind = $var['BIND_MGT']=='yes';
|
||||
$list = is_array($addr) ? array_merge(['*'],$addr) : ['*',$addr];
|
||||
$addr = ca_ipaddr("eth0");
|
||||
|
||||
foreach ($output as $line) {
|
||||
[$ip, $port] = ca_explode(':', $line);
|
||||
@ -701,25 +700,7 @@ function getPortsInUse() {
|
||||
|
||||
return $portsInUse;
|
||||
}
|
||||
####################################################
|
||||
# Define ipaddr if it doesn't already exist < 6.10 #
|
||||
####################################################
|
||||
function ca_ipaddr($ethX='eth0') {
|
||||
global $caPaths;
|
||||
|
||||
$net = parse_ini_file($caPaths['network_ini'],true);
|
||||
$eth = $net[$ethX];
|
||||
switch ($eth['PROTOCOL:0']) {
|
||||
case 'ipv4':
|
||||
return $eth['IPADDR:0'];
|
||||
case 'ipv6':
|
||||
return $eth['IPADDR6:0'];
|
||||
case 'ipv4+ipv6':
|
||||
return [$eth['IPADDR:0'],$$ethX['IPADDR6:0']];
|
||||
default:
|
||||
return $eth['IPADDR:0'];
|
||||
}
|
||||
}
|
||||
|
||||
function ca_explode($split,$text,$count=2) {
|
||||
return array_pad(explode($split,$text,$count),$count,'');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user