Call Broadcast: Updates for PHP 8.1
This commit is contained in:
parent
b4855290de
commit
be9390795c
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the call broadcasts
|
||||
$sql = "select call_broadcast_uuid, domain_uuid, broadcast_name ";
|
||||
$sql = "select call_broadcast_uuid, domain_uuid, broadcast_name, ";
|
||||
$sql .= "broadcast_description, broadcast_start_time, broadcast_timeout, ";
|
||||
$sql .= "broadcast_concurrent_limit, recording_uuid, broadcast_caller_id_name, ";
|
||||
$sql .= "broadcast_caller_id_number, broadcast_destination_type, broadcast_phone_numbers, ";
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
|
||||
//delete the call broadcast
|
||||
if (permission_exists('call_broadcast_delete')) {
|
||||
if ($_POST['action'] == 'delete' && is_uuid($call_broadcast_uuid)) {
|
||||
if (!empty($_POST['action']) && $_POST['action'] == 'delete' && is_uuid($call_broadcast_uuid)) {
|
||||
//prepare
|
||||
$call_broadcasts[0]['checked'] = 'true';
|
||||
$call_broadcasts[0]['uuid'] = $call_broadcast_uuid;
|
||||
|
|
@ -227,7 +227,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
if (!empty($array)) {
|
||||
|
||||
//add file selection and download sample
|
||||
$file_res = upload_file($sql, $broadcast_phone_numbers);
|
||||
$file_res = upload_file($sql ?? '', $broadcast_phone_numbers);
|
||||
if ($file_res['code'] != true) {
|
||||
$_SESSION["message_mood"] = "negative";
|
||||
$_SESSION["message"] = $text['file-error'];
|
||||
|
|
@ -538,11 +538,10 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='broadcast_avmd'>\n";
|
||||
echo " <option value='false' ".(($broadcast_avmd == "false") ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " <option value='true' ".(($broadcast_avmd == "true") ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
echo " <option value='true' ".(!empty($broadcast_avmd) && $broadcast_avmd == "true" ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-avmd']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
|
@ -584,4 +583,4 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
@ -1,5 +1,30 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* call broadcast class
|
||||
*
|
||||
|
|
@ -56,7 +81,7 @@ if (!class_exists('call_broadcast')) {
|
|||
|
||||
//build the delete array
|
||||
foreach($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
||||
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
|
|
@ -103,7 +128,7 @@ if (!class_exists('call_broadcast')) {
|
|||
|
||||
//get checked records
|
||||
foreach($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue