mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-28 11:15:43 +00:00
Fix the destination check for duplicates
This commit is contained in:
@@ -203,7 +203,7 @@
|
||||
if (empty($destination_context)) { $msg .= $text['message-required']." ".$text['label-destination_context']."<br>\n"; }
|
||||
|
||||
//check for duplicates
|
||||
if ($destination_type == 'inbound' && $destination_number != $db_destination_number && $settings->get('destinations', 'unique', false)) {
|
||||
if ($action == 'add' && $destination_type == 'inbound' && $settings->get('destinations', 'unique', false)) {
|
||||
$sql = "select count(*) from v_destinations ";
|
||||
$sql .= "where (destination_number = :destination_number or destination_prefix || destination_number = :destination_number) ";
|
||||
$sql .= "and destination_type = 'inbound' ";
|
||||
|
||||
Reference in New Issue
Block a user