Time Conditions: Fix for Issue 881 (Advanced button) and Issue 882 (Delete issue).

This commit is contained in:
Nate Jones
2015-03-17 19:02:48 +00:00
parent c07b8c73ac
commit 06bfa6502e
4 changed files with 16 additions and 7 deletions

View File

@@ -51,13 +51,12 @@ else {
$dialplan_uuid = check_str($dialplan_uuid);
//get the dialplan data
$sql = "select * from v_dialplans ";
$sql = "select dialplan_context from v_dialplans ";
$sql .= "where dialplan_uuid = '".$dialplan_uuid."' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
$database_dialplan_uuid = $row["dialplan_uuid"];
$dialplan_contexts[] = $row["dialplan_context"];
}
unset($prep_statement);
@@ -72,14 +71,15 @@ else {
//delete child data
$sql = "delete from v_dialplan_details ";
$sql .= "where dialplan_uuid = '".$dialplan_uuid."'; ";
$sql .= "and app_uuid = '4b821450-926b-175a-af93-a03c441818b1'; ";
$sql .= "where dialplan_uuid = '".$dialplan_uuid."' ";
$sql .= "and domain_uuid = '".$domain_uuid."'; ";
$db->query($sql);
unset($sql);
//delete parent data
$sql = "delete from v_dialplans ";
$sql .= "where dialplan_uuid = '".$dialplan_uuid."'; ";
$sql .= "where dialplan_uuid = '".$dialplan_uuid."' ";
$sql .= "and domain_uuid = '".$domain_uuid."' ";
$sql .= "and app_uuid = '4b821450-926b-175a-af93-a03c441818b1'; ";
$db->query($sql);
unset($sql);