From 8ce4bb165a10808e90f14e77ee76fe1db64665d4 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 25 Apr 2014 03:04:24 +0000 Subject: [PATCH] Add transaction support to the dialplan -> destination delete --- app/destinations/destination_delete.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/destinations/destination_delete.php b/app/destinations/destination_delete.php index b402e68a6d..db81db1fde 100644 --- a/app/destinations/destination_delete.php +++ b/app/destinations/destination_delete.php @@ -62,6 +62,9 @@ else { } unset ($prep_statement); +//start the atomic transaction + $db->beginTransaction(); + //delete the dialplan if (isset($dialplan_uuid)) { $sql = "delete from v_dialplan_details "; @@ -84,6 +87,9 @@ else { $db->exec(check_sql($sql)); unset($sql); +//commit the atomic transaction + $db->commit(); + //synchronize the xml config save_dialplan_xml();