v_fax_edit make sure dialplan_uuid has a value.
This commit is contained in:
parent
f0726e6b47
commit
616824a493
|
|
@ -236,6 +236,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//update the fax extension in the database
|
||||
$dialplan_type = "";
|
||||
$sql = "update v_fax set ";
|
||||
if (strlen($dialplan_uuid) > 0) {
|
||||
$sql .= "dialplan_uuid = '".$dialplan_uuid."', ";
|
||||
}
|
||||
$sql .= "fax_extension = '$fax_extension', ";
|
||||
$sql .= "fax_name = '$fax_name', ";
|
||||
$sql .= "fax_email = '$fax_email', ";
|
||||
|
|
@ -392,7 +395,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
else {
|
||||
$dialplan_detail_data = $_SESSION['switch']['storage']['dir'].'/fax/'.$fax_extension.'/inbox/${last_fax}.tif';
|
||||
}
|
||||
$sql = "";
|
||||
$sql = "update v_dialplan_details set ";
|
||||
$sql .= "dialplan_detail_data = '".$dialplan_detail_data."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
|
|
@ -448,8 +450,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//pre-populate the form
|
||||
if (strlen($_GET['id']) > 0 && $_POST["persistformvar"] != "true") {
|
||||
$fax_uuid = check_str($_GET["id"]);
|
||||
$sql = "";
|
||||
$sql .= "select * from v_fax ";
|
||||
$sql = "select * from v_fax ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and fax_uuid = '$fax_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
|
|
@ -473,6 +474,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
unset ($prep_statement);
|
||||
}
|
||||
|
||||
//set the dialplan_uuid
|
||||
if (strlen($dialplan_uuid) == 0) {
|
||||
$dialplan_uuid = uuid();
|
||||
}
|
||||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue