Fixed more php 8.1 errors (#6748)

* Update call_center_queue_edit.php

* Update number_translation_edit.php

* Update database_transactions.php

* Update xml_cdr_extension_summary.php

* Update call_flow_edit.php

* Update contact_address_edit.php

* Update device_profiles.php
This commit is contained in:
Alex 2023-06-08 16:07:01 -06:00 committed by GitHub
parent a07e7af955
commit 475cf4d253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 10 deletions

View File

@ -54,6 +54,7 @@
$queue_announce_frequency = '';
$queue_cc_exit_keys = '';
$queue_description = '';
$queue_timeout_action = '';
//action add or update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {

View File

@ -56,6 +56,7 @@
$call_flow_label = '';
$call_flow_alternate_label = '';
$call_flow_description = '';
$call_flow_status = '';
//action add or update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {

View File

@ -154,7 +154,7 @@
$parameters['domain_uuid'] = $domain_uuid;
$parameters['contact_uuid'] = $contact_uuid;
$database = new database;
$database->execute($sql, $parameters ?? null);
$database->execute($sql, $parameters);
unset($sql, $parameters);
}
@ -203,14 +203,14 @@
//pre-populate the form
if (!empty($_GET) && empty($_POST["persistformvar"])) {
$contact_address_uuid = $_GET["id"];
$contact_address_uuid = $_GET["id"] ?? '';
$sql = "select * from v_contact_addresses ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and contact_address_uuid = :contact_address_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['contact_address_uuid'] = $contact_address_uuid;
$database = new database;
$row = $database->select($sql, $parameters ?? null, 'row');
$row = $database->select($sql, $parameters, 'row');
if (!empty($row)) {
$address_type = $row["address_type"];
$address_label = $row["address_label"];

View File

@ -48,6 +48,7 @@
//set default values
$search = '';
$user_uuid = '';
//get variables used to control the order
$order_by = $_GET["order_by"] ?? '';

View File

@ -52,6 +52,9 @@
$profiles = $_POST['profiles'];
}
//set additional variables
$show = $_GET["show"] ?? '';
//get the search
$search = strtolower($_REQUEST["search"] ?? '');
$fields = strtolower($_REQUEST["fields"] ?? '');
@ -114,7 +117,7 @@
//get the count
$sql = "select count(*) from v_device_profiles ";
$sql .= "where true ";
if (!empty($_GET['show']) || $_GET['show'] != "all" || !permission_exists('device_profile_all')) {
if ($show != "all" || !permission_exists('device_profile_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $domain_uuid;
}
@ -129,7 +132,7 @@
$param .= "&search=".$search;
$param .= "&fields=".$fields;
}
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_profile_all')) {
if ($show == "all" && permission_exists('device_profile_all')) {
$param .= "&show=all";
}
$page = $_GET['page'] ?? 0;
@ -172,7 +175,7 @@
}
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('device_profile_all')) {
if (!empty($_GET['show']) && $_GET['show'] == 'all') {
if ($show == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
@ -223,7 +226,7 @@
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(empty($device_profiles) ? "style='visibility: hidden;'" : null).">\n";
echo " </th>\n";
}
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_profile_all')) {
if ($show == "all" && permission_exists('device_profile_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param);
}
echo th_order_by('device_profile_name', $text['label-device_profile_name'], $order_by, $order);
@ -247,7 +250,7 @@
echo " <input type='hidden' name='profiles[$x][uuid]' value='".escape($row['device_profile_uuid'])."' />\n";
echo " </td>\n";
}
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_profile_all')) {
if ($show == "all" && permission_exists('device_profile_all')) {
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
}

View File

@ -42,6 +42,11 @@
$language = new text;
$text = $language->get();
//set the defaults
$number_translation_name = '';
$number_translation_enabled = 'false';
$number_translation_description = '';
//action add or update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";

View File

@ -160,7 +160,7 @@
echo " <div class='field'>\n";
echo " <select class='formfld' name='include_internal' id='include_internal'>\n";
echo " <option value='0'>".$text['option-false']."</option>\n";
echo " <option value='1' ".(($include_internal == 1) ? "selected" : null).">".$text['option-true']."</option>\n";
echo " <option value='1' ".((!empty($include_internal) && $include_internal == 1) ? "selected" : null).">".$text['option-true']."</option>\n";
echo " </select>\n";
echo " </div>\n";
echo " </div>\n";
@ -244,4 +244,4 @@
//show the footer
require_once "resources/footer.php";
?>
?>