mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Destinations - Edit: Fix cross-domain (via Show All) edit bug.
This commit is contained in:
@@ -42,9 +42,6 @@
|
|||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//initialize the destinations object
|
|
||||||
$destination = new destinations;
|
|
||||||
|
|
||||||
//action add or update
|
//action add or update
|
||||||
if (is_uuid($_REQUEST["id"])) {
|
if (is_uuid($_REQUEST["id"])) {
|
||||||
$action = "update";
|
$action = "update";
|
||||||
@@ -122,6 +119,12 @@
|
|||||||
//process the http post
|
//process the http post
|
||||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
|
|
||||||
|
//initialize the destinations object
|
||||||
|
$destination = new destinations;
|
||||||
|
if (permission_exists('destination_domain') && is_uuid($domain_uuid)) {
|
||||||
|
$destination->domain_uuid = $domain_uuid;
|
||||||
|
}
|
||||||
|
|
||||||
//get the uuid
|
//get the uuid
|
||||||
if ($action == "update" && is_uuid($_POST["destination_uuid"])) {
|
if ($action == "update" && is_uuid($_POST["destination_uuid"])) {
|
||||||
$destination_uuid = trim($_POST["destination_uuid"]);
|
$destination_uuid = trim($_POST["destination_uuid"]);
|
||||||
@@ -701,9 +704,7 @@
|
|||||||
if (is_uuid($_GET["id"])) {
|
if (is_uuid($_GET["id"])) {
|
||||||
$destination_uuid = $_GET["id"];
|
$destination_uuid = $_GET["id"];
|
||||||
$sql = "select * from v_destinations ";
|
$sql = "select * from v_destinations ";
|
||||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
$sql .= "where destination_uuid = :destination_uuid ";
|
||||||
$sql .= "and destination_uuid = :destination_uuid ";
|
|
||||||
$parameters['domain_uuid'] = $domain_uuid;
|
|
||||||
$parameters['destination_uuid'] = $destination_uuid;
|
$parameters['destination_uuid'] = $destination_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$row = $database->select($sql, $parameters, 'row');
|
$row = $database->select($sql, $parameters, 'row');
|
||||||
@@ -794,6 +795,12 @@
|
|||||||
if ($destination_type =="outbound") { $destination_context = $_SESSION['domain_name']; }
|
if ($destination_type =="outbound") { $destination_context = $_SESSION['domain_name']; }
|
||||||
//if ($destination_type =="local") { $destination_context = $_SESSION['domain_name']; }
|
//if ($destination_type =="local") { $destination_context = $_SESSION['domain_name']; }
|
||||||
|
|
||||||
|
//initialize the destinations object
|
||||||
|
$destination = new destinations;
|
||||||
|
if (permission_exists('destination_domain') && is_uuid($domain_uuid)) {
|
||||||
|
$destination->domain_uuid = $domain_uuid;
|
||||||
|
}
|
||||||
|
|
||||||
//create token
|
//create token
|
||||||
$object = new token;
|
$object = new token;
|
||||||
$token = $object->create($_SERVER['PHP_SELF']);
|
$token = $object->create($_SERVER['PHP_SELF']);
|
||||||
|
|||||||
Reference in New Issue
Block a user