[devices] Use the default settings only when adding a device (#6061)
When a device is being updated then we want to persist the old values
This commit is contained in:
parent
d51a940d0f
commit
08bf6ad86f
|
|
@ -332,20 +332,26 @@
|
|||
$array['devices'][0]['device_lines'][$y]['sip_port'] = $row["sip_port"];
|
||||
}
|
||||
else {
|
||||
if ($action == "add") {
|
||||
$array['devices'][0]['device_lines'][$y]['sip_port'] = $_SESSION['provision']['line_sip_port']['numeric'];
|
||||
}
|
||||
}
|
||||
if (permission_exists('device_line_transport')) {
|
||||
$array['devices'][0]['device_lines'][$y]['sip_transport'] = $row["sip_transport"];
|
||||
}
|
||||
else {
|
||||
if ($action == "add") {
|
||||
$array['devices'][0]['device_lines'][$y]['sip_transport'] = $_SESSION['provision']['line_sip_transport']['text'];
|
||||
}
|
||||
}
|
||||
if (permission_exists('device_line_register_expires')) {
|
||||
$array['devices'][0]['device_lines'][$y]['register_expires'] = $row["register_expires"];
|
||||
}
|
||||
else {
|
||||
if ($action == "add") {
|
||||
$array['devices'][0]['device_lines'][$y]['register_expires'] = $_SESSION['provision']['line_register_expires']['numeric'];
|
||||
}
|
||||
}
|
||||
$y++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue