Call Forward (FM & DND): Updates for PHP 8.1

This commit is contained in:
fusionate 2023-06-02 17:46:10 +00:00
parent 7f16f52b8a
commit 7a0fbaeb8e
No known key found for this signature in database
3 changed files with 13 additions and 13 deletions

View File

@ -18,7 +18,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2010 - 2022 Copyright (C) 2010 - 2023
All Rights Reserved. All Rights Reserved.
Contributor(s): Contributor(s):
@ -143,7 +143,7 @@
//get current toggle state //get current toggle state
foreach ($records as $x => $record) { 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'] . "'"; $uuids[] = "'" . $record['uuid'] . "'";
} }
} }
@ -227,7 +227,7 @@
$p->delete('extension_edit', 'temp'); $p->delete('extension_edit', 'temp');
//send feature event notify to the phone //send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") { if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) { foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify; $feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name']; $feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -247,7 +247,7 @@
} }
//synchronize configuration //synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) { if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php"; require_once "app/extensions/resources/classes/extension.php";
$ext = new extension; $ext = new extension;
$ext->xml(); $ext->xml();

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2010 - 2016 Copyright (C) 2010 - 2023
All Rights Reserved. All Rights Reserved.
Contributor(s): Contributor(s):
@ -163,7 +163,7 @@
//get current toggle state //get current toggle state
foreach($records as $x => $record) { 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']."'"; $uuids[] = "'".$record['uuid']."'";
} }
} }
@ -240,7 +240,7 @@
$p->delete('extension_edit', 'temp'); $p->delete('extension_edit', 'temp');
//send feature event notify to the phone //send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") { if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) { foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify; $feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name']; $feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -260,7 +260,7 @@
} }
//synchronize configuration //synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) { if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php"; require_once "app/extensions/resources/classes/extension.php";
$ext = new extension; $ext = new extension;
$ext->xml(); $ext->xml();

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2010 - 2019 Copyright (C) 2010 - 2023
All Rights Reserved. All Rights Reserved.
Contributor(s): Contributor(s):
@ -307,7 +307,7 @@
//get current toggle state //get current toggle state
foreach($records as $x => $record) { 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']."'"; $uuids[] = "'".$record['uuid']."'";
} }
} }
@ -353,7 +353,7 @@
$extension['state'] == $this->toggle_values[1] //false becoming true $extension['state'] == $this->toggle_values[1] //false becoming true
&& is_uuid($extension['follow_me_uuid']) && is_uuid($extension['follow_me_uuid'])
) { ) {
$sql .= "select count(*) from v_follow_me_destinations where follow_me_uuid = :follow_me_uuid"; $sql = "select count(*) from v_follow_me_destinations where follow_me_uuid = :follow_me_uuid";
$parameters['follow_me_uuid'] = $extension['follow_me_uuid']; $parameters['follow_me_uuid'] = $extension['follow_me_uuid'];
$database = new database; $database = new database;
$num_rows = $database->select($sql, $parameters, 'column'); $num_rows = $database->select($sql, $parameters, 'column');
@ -405,7 +405,7 @@
$p->delete('follow_me_edit', 'temp'); $p->delete('follow_me_edit', 'temp');
//send feature event notify to the phone //send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") { if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) { foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify; $feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name']; $feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -425,7 +425,7 @@
} }
//synchronize configuration //synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) { if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php"; require_once "app/extensions/resources/classes/extension.php";
$ext = new extension; $ext = new extension;
$ext->xml(); $ext->xml();