(legacy) openvpn don't write empty xml tags to avoid issues with backend

This commit is contained in:
Ad Schellevis 2015-08-11 16:44:57 +00:00
parent 73f382fb83
commit 29d4755b71
3 changed files with 3 additions and 3 deletions

View File

@ -264,7 +264,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
foreach (explode(",",$copy_fields) as $fieldname) {
$fieldname = trim($fieldname);
if(isset($pconfig[$fieldname])) {
if(!empty($pconfig[$fieldname])) {
$client[$fieldname] = $pconfig[$fieldname];
}
}

View File

@ -167,7 +167,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// 1 on 1 copy of config attributes
foreach (explode(",",$all_form_fields) as $fieldname) {
$fieldname = trim($fieldname);
if(isset($pconfig[$fieldname])) {
if(!empty($pconfig[$fieldname])) {
$csc[$fieldname] = $pconfig[$fieldname];
}
}

View File

@ -329,7 +329,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
foreach (explode(",",$copy_fields) as $fieldname) {
$fieldname = trim($fieldname);
if(isset($pconfig[$fieldname])) {
if(!empty($pconfig[$fieldname])) {
$server[$fieldname] = $pconfig[$fieldname];
}
}