Removed conflicting setting for OpenELEC/LibreELEC form updates

This commit is contained in:
bergware
2018-08-14 16:27:42 +02:00
parent 20fd8108c2
commit 2d14587ead
2 changed files with 6 additions and 0 deletions
@@ -363,6 +363,9 @@ $hdrXML = "<?xml version='1.0' encoding='UTF-8'?>\n"; // XML encoding declaratio
$arrExistingConfig['metadata']['vmtemplate']['@attributes']['xmlns'] = 'unraid';
$arrExistingConfig['cputune']['vcpupin'] = [];
$arrUpdatedConfig = custom::createArray('domain',$lv->config_to_xml($_POST));
// controller USB removed from updated config
unset($arrUpdatedConfig['devices']['controller']);
// it already exists and causes wrong array merge below. PHP bug?
$arrConfig = array_replace_recursive($arrExistingConfig, $arrUpdatedConfig);
$xml = custom::createXML('domain',$arrConfig)->saveXML();
}
@@ -365,6 +365,9 @@ $hdrXML = "<?xml version='1.0' encoding='UTF-8'?>\n"; // XML encoding declaratio
$arrExistingConfig['metadata']['vmtemplate']['@attributes']['xmlns'] = 'unraid';
$arrExistingConfig['cputune']['vcpupin'] = [];
$arrUpdatedConfig = custom::createArray('domain',$lv->config_to_xml($_POST));
// controller USB removed from updated config
unset($arrUpdatedConfig['devices']['controller']);
// it already exists and causes wrong array merge below. PHP bug?
$arrConfig = array_replace_recursive($arrExistingConfig, $arrUpdatedConfig);
$xml = custom::createXML('domain',$arrConfig)->saveXML();
}