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

View File

@@ -54,7 +54,7 @@
}
//get http post variables and set them to php variables
if (is_array($_POST) && @sizeof($_POST) != 0) {
if (!empty($_POST)) {
$number_translation_name = $_POST["number_translation_name"];
$number_translation_details = $_POST["number_translation_details"];
$number_translation_enabled = $_POST["number_translation_enabled"] ?: 'false';
@@ -108,7 +108,7 @@
}
//redirect the user
if (in_array($_POST['action'], array('copy', 'delete', 'toggle'))) {
if (!empty($_POST['action'], array('copy', 'delete', 'toggle'))) {
header('Location: number_translation_edit.php?id='.$number_translation_uuid);
exit;
}
@@ -158,7 +158,7 @@
$database->save($array);
//redirect the user
if (isset($action)) {
if (!empty($action)) {
if ($action == "add") {
$_SESSION["message"] = $text['message-add'];
}
@@ -193,12 +193,12 @@
$sql .= "order by number_translation_detail_order asc";
$parameters['number_translation_uuid'] = $number_translation_uuid;
$database = new database;
$number_translation_details = $database->select($sql, $parameters, 'all');
$number_translation_details = $database->select($sql, $parameters ?? null, 'all');
unset ($sql, $parameters);
}
//add an empty row
if (is_array($number_translation_details) && @sizeof($number_translation_details) != 0) {
if (!empty($number_translation_details)) {
$x = count($number_translation_details);
}
else {
@@ -275,7 +275,7 @@
echo " <th class='vtablereq'>".$text['label-number_translation_detail_regex']."</th>\n";
echo " <th class='vtablereq'>".$text['label-number_translation_detail_replace']."</th>\n";
echo " <th class='vtablereq'>".$text['label-number_translation_detail_order']."</th>\n";
if (is_array($number_translation_details) && @sizeof($number_translation_details) > 1 && permission_exists('number_translation_detail_delete')) {
if (!empty($number_translation_details) && @sizeof($number_translation_details) > 1 && permission_exists('number_translation_detail_delete')) {
echo " <td class='vtable edit_delete_checkbox_all' onmouseover=\"swap_display('delete_label_details', 'delete_toggle_details');\" onmouseout=\"swap_display('delete_label_details', 'delete_toggle_details');\">\n";
echo " <span id='delete_label_details'>".$text['label-action']."</span>\n";
echo " <span id='delete_toggle_details'><input type='checkbox' id='checkbox_all_details' name='checkbox_all' onclick=\"edit_all_toggle('details'); checkbox_on_change(this);\"></span>\n";

View File

@@ -127,7 +127,7 @@
$sql .= ") ";
}
$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 = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
@@ -153,7 +153,7 @@
$sql .= order_by($order_by, $order, 'number_translation_name', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$number_translations = $database->select($sql, $parameters ?? '', 'all');
$number_translations = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token