Update bridges.php

This commit is contained in:
FusionPBX 2019-11-30 12:04:42 -07:00 committed by GitHub
parent 585183f12b
commit 858a0c2022
1 changed files with 8 additions and 9 deletions

View File

@ -43,32 +43,31 @@
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
//get posted data //get the http post data
if (is_array($_POST['bridges'])) { if (is_array($_POST['bridges'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'];
$bridges = $_POST['bridges']; $bridges = $_POST['bridges'];
} }
//process posted data by action //process the http post data by action
if ($action != '' && is_array($bridges) && @sizeof($bridges) != 0) { if ($action != '' && is_array($bridges) && @sizeof($bridges) != 0) {
$obj = new bridges;
switch ($action) { switch ($action) {
case 'copy': case 'copy':
if (permission_exists('bridge_add')) { if (permission_exists('bridge_add')) {
$obj = new bridges;
$obj->copy($bridges); $obj->copy($bridges);
} }
break; break;
case 'toggle': case 'toggle':
if (permission_exists('bridge_edit')) { if (permission_exists('bridge_edit')) {
$obj = new bridges;
$obj->toggle($bridges); $obj->toggle($bridges);
} }
break; break;
case 'delete': case 'delete':
if (permission_exists('bridge_delete')) { if (permission_exists('bridge_delete')) {
$obj = new bridges;
$obj->delete($bridges); $obj->delete($bridges);
} }
break; break;
@ -185,7 +184,7 @@
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($bridges ?: "style='visibility: hidden;'").">\n"; echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($bridges ?: "style='visibility: hidden;'").">\n";
echo " </th>\n"; echo " </th>\n";
} }
if ($_GET['show'] == "all" && permission_exists('bridge_all')) { if ($_GET['show'] == 'all' && permission_exists('bridge_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order); echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
} }
echo th_order_by('bridge_name', $text['label-bridge_name'], $order_by, $order); echo th_order_by('bridge_name', $text['label-bridge_name'], $order_by, $order);
@ -210,7 +209,7 @@
echo " <input type='hidden' name='bridges[$x][uuid]' value='".escape($row['bridge_uuid'])."' />\n"; echo " <input type='hidden' name='bridges[$x][uuid]' value='".escape($row['bridge_uuid'])."' />\n";
echo " </td>\n"; echo " </td>\n";
} }
if ($_GET['show'] == "all" && permission_exists('bridge_all')) { if ($_GET['show'] == 'all' && permission_exists('bridge_all')) {
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n"; echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
} }
echo " <td>"; echo " <td>";