Update dialplan.php

This commit is contained in:
FusionPBX 2018-12-06 09:32:39 -07:00 committed by GitHub
parent 0e7e802c1f
commit c2e581d18e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -42,6 +42,8 @@ include "root.php";
//dialplans
public $dialplan_name;
public $dialplan_number;
public $dialplan_destination;
public $dialplan_continue;
public $dialplan_order;
public $dialplan_context;
@ -89,12 +91,12 @@ include "root.php";
$sql .= "dialplan_uuid, ";
$sql .= "dialplan_name, ";
$sql .= "dialplan_number, ";
$sql .= "dialplan_destination, ";
$sql .= "dialplan_continue, ";
$sql .= "dialplan_order, ";
$sql .= "dialplan_context, ";
$sql .= "dialplan_enabled, ";
$sql .= "dialplan_description, ";
$sql .= "dialplan_destination ";
$sql .= "dialplan_description ";
$sql .= ")";
$sql .= "values ";
$sql .= "(";
@ -108,12 +110,12 @@ include "root.php";
$sql .= "'".check_str($this->dialplan_uuid)."', ";
$sql .= "'".check_str($this->dialplan_name)."', ";
$sql .= "'".check_str($this->dialplan_number)."', ";
$sql .= "'".check_str($this->dialplan_destination)."', ";
$sql .= "'".check_str($this->dialplan_continue)."', ";
$sql .= "'".check_str($this->dialplan_order)."', ";
$sql .= "'".check_str($this->dialplan_context)."', ";
$sql .= "'".check_str($this->dialplan_enabled)."', ";
$sql .= "'".check_str($this->dialplan_description)."', ";
$sql .= "'".check_str($this->dialplan_destination)."' ";
$sql .= "'".check_str($this->dialplan_description)."' ";
$sql .= ")";
$this->db->exec(check_sql($sql));
unset($sql);
@ -334,6 +336,9 @@ include "root.php";
$this->dialplan_uuid = uuid();
$this->dialplan_name = $dialplan['extension']['@attributes']['name'];
$this->dialplan_number = $dialplan['extension']['@attributes']['number'];
if (strlen($dialplan['extension']['@attributes']['destination']) > 0) {
$this->dialplan_destination = $dialplan['extension']['@attributes']['destination'];
}
$this->dialplan_global = false;
if (strlen($dialplan['extension']['@attributes']['global']) > 0) {
if ($dialplan['extension']['@attributes']['global'] == "true") {
@ -348,9 +353,6 @@ include "root.php";
}
else {
$this->dialplan_enabled = "true";
}
if (strlen($dialplan['extension']['@attributes']['destination']) > 0) {
$this->dialplan_destination = $dialplan['extension']['@attributes']['destination'];
}
$this->dialplan_description = '';
$this->dialplan_add();