mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge pull request #1086 from phil-davis/patch-9
This commit is contained in:
commit
82f273e105
@ -3182,32 +3182,30 @@ function upgrade_100_to_101() {
|
||||
function upgrade_101_to_102() {
|
||||
global $config, $g;
|
||||
|
||||
if (!is_array($config['captiveportal']))
|
||||
return;
|
||||
if (is_array($config['captiveportal'])) {
|
||||
foreach ($config['captiveportal'] as $cpzone => $cp) {
|
||||
if (!is_array($cp['passthrumac']))
|
||||
continue;
|
||||
|
||||
foreach ($config['captiveportal'] as $cpzone => $cp) {
|
||||
if (!is_array($cp['passthrumac']))
|
||||
continue;
|
||||
|
||||
foreach ($cp['passthrumac'] as $idx => $passthrumac)
|
||||
$config['captiveportal'][$cpzone]['passthrumac'][$idx]['action'] = 'pass';
|
||||
foreach ($cp['passthrumac'] as $idx => $passthrumac)
|
||||
$config['captiveportal'][$cpzone]['passthrumac'][$idx]['action'] = 'pass';
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert OpenVPN Compression option to the new style */
|
||||
// Nothing to do if there is no OpenVPN tag
|
||||
if (!isset($config['openvpn']) || !is_array($config['openvpn']))
|
||||
return;
|
||||
|
||||
if (is_array($config['openvpn']['openvpn-server'])) {
|
||||
foreach ($config['openvpn']['openvpn-server'] as &$vpn) {
|
||||
if (!empty($vpn['compression']))
|
||||
$vpn['compression'] = "adaptive";
|
||||
if (isset($config['openvpn']) && is_array($config['openvpn'])) {
|
||||
if (is_array($config['openvpn']['openvpn-server'])) {
|
||||
foreach ($config['openvpn']['openvpn-server'] as &$vpn) {
|
||||
if (!empty($vpn['compression']))
|
||||
$vpn['compression'] = "adaptive";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_array($config['openvpn']['openvpn-client'])) {
|
||||
foreach ($config['openvpn']['openvpn-client'] as &$vpn) {
|
||||
if (!empty($vpn['compression']))
|
||||
$vpn['compression'] = "adaptive";
|
||||
if (is_array($config['openvpn']['openvpn-client'])) {
|
||||
foreach ($config['openvpn']['openvpn-client'] as &$vpn) {
|
||||
if (!empty($vpn['compression']))
|
||||
$vpn['compression'] = "adaptive";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user