Update formcreate.class.php
Clean up form create
This commit is contained in:
parent
3381ad189b
commit
21f9123ece
|
@ -129,17 +129,11 @@ class formcreate
|
||||||
if (empty($res_id)) {
|
if (empty($res_id)) {
|
||||||
$res_id = $res_name;
|
$res_id = $res_name;
|
||||||
}
|
}
|
||||||
if (!empty($fvalues[$res_n])) {
|
if (!empty($fvalues[$res_n]['data'])) {
|
||||||
if (!empty($fvalues[$res_n]['data'])) {
|
$value->value = $fvalues[$res_n]['data'];
|
||||||
$value->value = $fvalues[$res_n]['data'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Default to chan-sccp defaults, not xml defaults.
|
// Default to chan-sccp defaults, not xml defaults if reverting to defaults or empty
|
||||||
if (empty($value->value)) {
|
if ((empty($value->value)) || ($usingSysDefaults)) {
|
||||||
$value->value = $sccp_defaults[$res_n]['systemdefault'];
|
|
||||||
}
|
|
||||||
if ($usingSysDefaults) {
|
|
||||||
// using system defaults
|
|
||||||
$value->value = $sccp_defaults[$res_n]['systemdefault'];
|
$value->value = $sccp_defaults[$res_n]['systemdefault'];
|
||||||
}
|
}
|
||||||
if (empty($value->type)) {
|
if (empty($value->type)) {
|
||||||
|
|
Loading…
Reference in a new issue