Add transaction support to the dialplan -> destination delete

This commit is contained in:
Mark Crane 2014-04-25 03:04:24 +00:00
parent 2b99cb286c
commit 8ce4bb165a
1 changed files with 6 additions and 0 deletions

View File

@ -62,6 +62,9 @@ else {
} }
unset ($prep_statement); unset ($prep_statement);
//start the atomic transaction
$db->beginTransaction();
//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 ";
@ -84,6 +87,9 @@ else {
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);
//commit the atomic transaction
$db->commit();
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();