Update destination_delete.php

This commit is contained in:
FusionPBX 2017-04-04 23:32:10 -06:00 committed by GitHub
parent 0852dee581
commit 5f15324d1f
1 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2016 Portions created by the Initial Developer are Copyright (C) 2008-2017
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -43,12 +43,12 @@
$text = $language->get(); $text = $language->get();
//get the ID //get the ID
if (count($_GET) > 0) { if (is_array($_GET)) {
$id = check_str($_GET["id"]); $id = check_str($_GET["id"]);
} }
//if the ID is not set then exit //if the ID is not set then exit
if (!isset($id)) { if (!is_uuid($id)) {
echo "ID is required."; echo "ID is required.";
exit; exit;
} }
@ -82,22 +82,22 @@
//delete the dialplan //delete the dialplan
if (isset($dialplan_uuid)) { if (isset($dialplan_uuid)) {
$sql = "delete from v_dialplan_details "; $sql = "delete from v_dialplan_details ";
$sql .= "where domain_uuid = '".$domain_uuid."' "; $sql .= "where dialplan_uuid = '".$dialplan_uuid."' ";
$sql .= "and dialplan_uuid = '".$dialplan_uuid."' "; //echo $sql."<br />\n";
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);
$sql = "delete from v_dialplans "; $sql = "delete from v_dialplans ";
$sql .= "where domain_uuid = '".$domain_uuid."' "; $sql .= "where dialplan_uuid = '".$dialplan_uuid."' ";
$sql .= "and dialplan_uuid = '".$dialplan_uuid."' "; //echo $sql."<br />\n";
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);
} }
//delete the destination //delete the destination
$sql = "delete from v_destinations "; $sql = "delete from v_destinations ";
$sql .= "where domain_uuid = '".$domain_uuid."' "; $sql .= "where destination_uuid = '".$id."' ";
$sql .= "and destination_uuid = '".$id."' "; echo $sql."<br />\n";
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);