diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index b6e3a798ab..bea61afba8 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -224,8 +224,11 @@ } //if the user doesn't have the correct permission then - //override destination_number and destination_context values + //override variables using information from the database if (is_array($row) && @sizeof($row) != 0) { + if (!permission_exists('destination_prefix')) { + $destination_prefix = $row["destination_prefix"]; + } if (!permission_exists('destination_trunk_prefix')) { $destination_trunk_prefix = $row["destination_trunk_prefix"]; } @@ -239,9 +242,48 @@ if (!permission_exists('destination_condition_field')) { $destination_condition_field = $row["destination_condition_field"]; } + if (!permission_exists('destination_caller_id_name')) { + $destination_caller_id_name = $row["destination_caller_id_name"]; + } + if (!permission_exists('destination_caller_id_number')) { + $destination_caller_id_number = $row["destination_caller_id_number"]; + } if (!permission_exists('destination_context')) { $destination_context = $row["destination_context"]; } + if (!permission_exists('destination_fax')) { + $fax_uuid = $row["fax_uuid"]; + } + if (!permission_exists('provider_edit')) { + $provider_uuid = $row["provider_uuid"]; + } + if (!permission_exists('user_edit')) { + $user_uuid = $row["user_uuid"]; + } + if (!permission_exists('group_edit')) { + $group_uuid = $row["group_uuid"]; + } + if (!permission_exists('destination_cid_name_prefix')) { + $destination_cid_name_prefix = $row["destination_cid_name_prefix"]; + } + if (!permission_exists('destination_record')) { + $destination_record = $row["destination_record"]; + } + if (!permission_exists('destination_hold_music')) { + $destination_hold_music = $row["destination_hold_music"]; + } + if (!permission_exists('destination_distinctive_ring')) { + $destination_distinctive_ring = $row["destination_distinctive_ring"]; + } + if (!permission_exists('destination_accountcode')) { + $destination_accountcode = $row["destination_accountcode"]; + } + if (!permission_exists('destination_emergency')) { + $destination_type_emergency = $row["destination_type_emergency"]; + } + if (!permission_exists('destination_domain')) { + $domain_uuid = $row["domain_uuid"]; + } } unset($row); @@ -1372,16 +1414,18 @@ echo "\n"; } - echo "