fix orphan v_ring_group_users after deleting ring group (#2110)

* fix orphan v_ring_group_users after deleting ring group

steps to test:
create a ring group with one extension and one user.  This will add one user to v_ring_group_users.  Delete the ring group.

expected result:
ring group and all it's components are deleted

actual result
v_ring_group_user entry for this ring group is not deleted.

This fix: deletes v_ring_group_user when ring group is deleted.

* Update ring_group_delete.php

* Update ring_group_delete.php

Remove the hidden spaces
This commit is contained in:
jebsolutions 2016-11-21 15:59:12 -05:00 committed by FusionPBX
parent b5099c1e77
commit b36051f73f
1 changed files with 8 additions and 1 deletions

View File

@ -73,6 +73,13 @@ else {
$db->exec(check_sql($sql));
unset($sql);
//delete the ring group users
$sql = "delete from v_ring_group_users ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and ring_group_uuid = '".$id."' ";
$db->exec(check_sql($sql));
unset($sql);
//delete the dialplan details
$sql = "delete from v_dialplan_details ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
@ -103,4 +110,4 @@ else {
header("Location: ring_groups.php");
return;
?>
?>