Finish up the changes to the duplicate test.
This commit is contained in:
parent
6688443ca9
commit
daa128ba00
|
|
@ -79,14 +79,15 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
if (strlen($destination_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-destination_enabled']."<br>\n"; }
|
if (strlen($destination_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-destination_enabled']."<br>\n"; }
|
||||||
|
|
||||||
//get the current destination_number
|
//get the current destination_number
|
||||||
$sql = "select count(*) as num_rows from v_destinations ";
|
$sql = "select destination_number from v_destinations ";
|
||||||
$sql .= "where destination_number = '".$destination_number."' ";
|
$sql .= "where destination_uuid = '".$destination_uuid."' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$sql .= "and destination_number = '".$destination_number."' ";
|
||||||
if ($prep_statement) {
|
$prep_statement = $db->prepare($sql);
|
||||||
$prep_statement->execute();
|
if ($prep_statement) {
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$prep_statement->execute();
|
||||||
$db_destination_number = $row['destination_number'];
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
}
|
$db_destination_number = $row['destination_number'];
|
||||||
|
}
|
||||||
|
|
||||||
//check for duplicates
|
//check for duplicates
|
||||||
if ($action == "add" || $destination_number != $db_destination_number) {
|
if ($action == "add" || $destination_number != $db_destination_number) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue