Update bridges.php

This commit is contained in:
FusionPBX 2019-10-19 09:07:07 -06:00 committed by GitHub
parent 60af70e246
commit b38eb01980
1 changed files with 19 additions and 15 deletions

View File

@ -45,13 +45,14 @@ if (!class_exists('bridges')) {
//delete multiple bridges
if (is_array($bridges) && @sizeof($bridges) != 0) {
//delete the checked rows
//build the delete array
foreach($bridges as $x => $row) {
if ($row['checked'] == 'true' && is_uuid($row['bridge_uuid'])) {
$array['bridges'][$x]['bridge_uuid'] = $row['bridge_uuid'];
$array['bridges'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
}
}
//delete the checked rows
if (is_array($array) && @sizeof($array) != 0) {
//execute delete
$database = new database;
@ -116,8 +117,9 @@ if (!class_exists('bridges')) {
$x++;
}
//save the changes
if (is_array($array) && @sizeof($array) != 0) {
//execute update
//save the array
$database = new database;
$database->app_name = 'bridges';
$database->app_uuid = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
@ -179,13 +181,15 @@ if (!class_exists('bridges')) {
}
unset($sql, $parameters, $rows, $row);
}
//execute insert
//save the changes and set the message
if (is_array($array) && @sizeof($array) != 0) {
//save the array
$database = new database;
$database->app_name = 'bridges';
$database->app_uuid = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
$database->save($array);
unset($array);
//set message
message::add($text['message-copy']);
}