From 0ba42a5c074ca63adf6f1001ae01400236cd410c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 22 Jul 2016 12:28:17 -0600 Subject: [PATCH] Update ivr_menu.php The Dialplan needs the ivr_menu_uuid and the IVR Menu needs the dialplan_uuid. This fixes a new IVR Menu dialplan so it points to the ivr_menu_uuid. --- app/ivr_menus/resources/classes/ivr_menu.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/ivr_menus/resources/classes/ivr_menu.php b/app/ivr_menus/resources/classes/ivr_menu.php index c966958bd3..d99326c9f2 100644 --- a/app/ivr_menus/resources/classes/ivr_menu.php +++ b/app/ivr_menus/resources/classes/ivr_menu.php @@ -167,7 +167,7 @@ include "root.php"; $action = "update"; } - //update the dialplan + //add or update the dialplan $this->dialplan($array); $array['dialplan_uuid'] = $this->dialplan_uuid; @@ -178,6 +178,13 @@ include "root.php"; $orm->uuid($this->ivr_menu_uuid); } $orm->save($array); + $this->ivr_menu_uuid = $orm->message['uuid']; + + //update dialplan with the ivr_menu_uuid + if ($action == "add") { + $array['ivr_menu_uuid'] = $this->ivr_menu_uuid; + $this->dialplan($array); + } //set the add message if ($action == "add" && permission_exists('ivr_menu_add')) {