mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
php 8.1 changes (#6721)
* Update call_flows.php * Update call_flow_edit.php * Update call_forward.php * Update call_forward_edit.php * Update call_recordings.php * Update conference_centers.php * Update default_settings.php * Update default_setting_edit.php * Update access_controls.php * Update number_translations.php * Update number_translation_edit.php * Update setting_edit.php * Update bridges.php * Update bridge_edit.php * Update call_broadcast_edit.php * Update call_broadcast.php * Update call_block.php * Update call_broadcast_edit.php * Update call_center_agent_edit.php * Update call_center_agent_status.php * Update call_recordings.php
This commit is contained in:
@@ -46,8 +46,11 @@
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//get posted data
|
||||
if (is_array($_POST['call_flows'])) {
|
||||
if (!empty($_POST['call_flows'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$call_flows = $_POST['call_flows'];
|
||||
@@ -55,7 +58,7 @@
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($call_flows) && @sizeof($call_flows) != 0) {
|
||||
if (!empty($action) && !empty($call_flows)) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('call_flow_add')) {
|
||||
@@ -83,11 +86,11 @@
|
||||
}
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"]);
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
if (!empty($search)) {
|
||||
$sql_search = "and (";
|
||||
$sql_search .= "lower(call_flow_name) like :search ";
|
||||
@@ -105,21 +108,21 @@
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from v_call_flows ";
|
||||
$sql .= "where true ";
|
||||
if ($_GET['show'] != "all" || !permission_exists('call_flow_all')) {
|
||||
if (!empty($_GET['show']) != "all" || !permission_exists('call_flow_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
$sql .= $sql_search;
|
||||
$sql .= $sql_search ?? '';
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".urlencode($search);
|
||||
if ($_GET['show'] == "all" && permission_exists('call_flow_all')) {
|
||||
if (!empty($_GET['show']) == "all" && permission_exists('call_flow_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'];
|
||||
$page = $_GET['page'] ?? '';
|
||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
@@ -130,7 +133,7 @@
|
||||
$sql .= order_by($order_by, $order, 'call_flow_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$call_flows = $database->select($sql, $parameters, 'all');
|
||||
$call_flows = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
@@ -174,7 +177,7 @@
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('call_flow_all')) {
|
||||
if ($_GET['show'] == 'all') {
|
||||
if (!empty($_GET['show']) == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
else {
|
||||
@@ -214,10 +217,10 @@
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('call_flow_add') || permission_exists('call_flow_edit') || permission_exists('call_flow_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($call_flows ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($call_flows) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if ($_GET['show'] == "all" && permission_exists('call_flow_all')) {
|
||||
if (!empty($_GET['show']) == "all" && permission_exists('call_flow_all')) {
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
echo th_order_by('call_flow_name', $text['label-call_flow_name'], $order_by, $order);
|
||||
@@ -229,12 +232,12 @@
|
||||
}
|
||||
echo th_order_by('call_flow_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('call_flow_description', $text['label-call_flow_description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('call_flow_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($call_flows)) {
|
||||
if (!empty($call_flows)) {
|
||||
$x = 0;
|
||||
foreach ($call_flows as $row) {
|
||||
if (permission_exists('call_flow_edit')) {
|
||||
@@ -247,7 +250,7 @@
|
||||
echo " <input type='hidden' name='call_flows[$x][uuid]' value='".escape($row['call_flow_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if ($_GET['show'] == "all" && permission_exists('call_flow_all')) {
|
||||
if (!empty($_GET['show']) == "all" && permission_exists('call_flow_all')) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
@@ -281,7 +284,7 @@
|
||||
echo escape($row['call_flow_enabled']);
|
||||
}
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['call_flow_description'])." </td>\n";
|
||||
if (permission_exists('call_flow_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
||||
Reference in New Issue
Block a user