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:
Alex
2023-05-26 11:48:39 -06:00
committed by GitHub
parent b939ac2442
commit 3112c9ae18
18 changed files with 243 additions and 209 deletions
+9 -8
View File
@@ -47,6 +47,7 @@
//set additional variables
$search = $_GET["search"] ?? '';
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
@@ -97,7 +98,7 @@
//prepare to page the results
$sql = "select count(*) from view_call_block ";
$sql .= "where true ";
if (!empty($_GET['show']) == "all" && permission_exists('call_block_all')) {
if ($show == "all" && permission_exists('call_block_all')) {
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
@@ -105,7 +106,7 @@
$sql .= "and (domain_uuid = :domain_uuid) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
if (!permission_exists('call_block_all') && !empty($_SESSION['user']['extension'])) {
$sql .= "and extension_uuid in (";
$x = 0;
foreach ($_SESSION['user']['extension'] as $field) {
@@ -128,7 +129,7 @@
$parameters['search'] = '%'.$search.'%';
}
$database = new database;
$num_rows = $database->select($sql, $parameters ?? '', 'column');
$num_rows = $database->select($sql, $parameters ?? null, 'column');
unset($parameters);
//prepare to page the results
@@ -179,7 +180,7 @@
$sql .= order_by($order_by, $order, ['call_block_country_code','call_block_number']);
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$result = $database->select($sql, $parameters ?? '', 'all');
$result = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token
@@ -208,7 +209,7 @@
}
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('call_block_all')) {
if (!empty($_GET['show']) == 'all') {
if ($show == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
@@ -218,7 +219,7 @@
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']);
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_block.php','style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
if (!empty($paging_controls_mini)) {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
}
echo " </form>\n";
@@ -250,7 +251,7 @@
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
if (!empty($_GET['show']) == 'all' && permission_exists('domain_all')) {
if (!$show == 'all' && permission_exists('domain_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
}
echo th_order_by('call_block_direction', $text['label-direction'], $order_by, $order, null, "style='width: 1%;' class='center'");
@@ -281,7 +282,7 @@
echo " <input type='hidden' name='call_blocks[".$x."][uuid]' value='".escape($row['call_block_uuid'])."' />\n";
echo " </td>\n";
}
if (!empty($_GET['show']) == 'all' && permission_exists('domain_all')) {
if ($show == 'all' && permission_exists('domain_all')) {
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
}
echo " <td class='center'>";