Update dialplan_inbound_add.php

This commit is contained in:
FusionPBX 2016-10-14 08:09:05 -06:00 committed by GitHub
parent 457007a773
commit f308baa77f
1 changed files with 82 additions and 70 deletions

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2015
Portions created by the Initial Developer are Copyright (C) 2008-2016
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -25,9 +25,13 @@
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
Riccardo Granchi <riccardo.granchi@nems.it>
*/
//includes
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('inbound_route_add')) {
//access granted
}
@ -117,6 +121,7 @@ else {
if (strlen($dialplan_enabled) == 0) { $dialplan_enabled = "true"; } //set default to enabled
}
//process the http post data
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//check for all required data
if (strlen($domain_uuid) == 0) { $msg .= "".$text['label-required-domain_uuid']."<br>\n"; }
@ -669,6 +674,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//commit the atomic transaction
$count = $db->exec("COMMIT;"); //returns affected rows
//update the dialplan xml
$dialplans = new dialplan;
$dialplans->source = "details";
$dialplans->destination = "database";
$dialplans->uuid = $dialplan_uuid;
$dialplans->xml();
//clear the cache
$cache = new cache;
$cache->delete("dialplan:public");