Make sure the dialplan_uuid is set before trying to delete it
This commit is contained in:
@@ -59,17 +59,19 @@
|
|||||||
}
|
}
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
//delete child data
|
//delete child data
|
||||||
$sql = "delete from v_dialplan_details ";
|
if (isset($dialplan_uuid)) {
|
||||||
$sql .= "where dialplan_uuid = '".$dialplan_uuid."'; ";
|
$sql = "delete from v_dialplan_details ";
|
||||||
$db->query($sql);
|
$sql .= "where dialplan_uuid = '".$dialplan_uuid."'; ";
|
||||||
unset($sql);
|
$db->query($sql);
|
||||||
|
unset($sql);
|
||||||
|
}
|
||||||
//delete parent data
|
//delete parent data
|
||||||
$sql = "delete from v_dialplans ";
|
if (isset($dialplan_uuid)) {
|
||||||
$sql .= "where dialplan_uuid = '".$dialplan_uuid."'; ";
|
$sql = "delete from v_dialplans ";
|
||||||
$db->query($sql);
|
$sql .= "where dialplan_uuid = '".$dialplan_uuid."'; ";
|
||||||
unset($sql);
|
$db->query($sql);
|
||||||
//unset the variable
|
unset($sql,$dialplan_uuid);
|
||||||
unset($dialplan_uuid);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//only run the following code if the directory exists
|
//only run the following code if the directory exists
|
||||||
|
|||||||
Reference in New Issue
Block a user