mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Dashboard - Edit: Updates for PHP 8.1
This commit is contained in:
@@ -85,7 +85,7 @@ if (!class_exists('dashboard')) {
|
||||
$x = 0;
|
||||
foreach ($records as $record) {
|
||||
//add to the array
|
||||
if ($record['checked'] == 'true' && is_uuid($record['dashboard_uuid'])) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['dashboard_uuid'])) {
|
||||
$array[$this->table][$x]['dashboard_uuid'] = $record['dashboard_uuid'];
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ if (!class_exists('dashboard')) {
|
||||
|
||||
//get checked records
|
||||
foreach($records as $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['dashboard_uuid'])) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['dashboard_uuid'])) {
|
||||
$uuids[] = "'".$record['dashboard_uuid']."'";
|
||||
}
|
||||
}
|
||||
@@ -210,7 +210,7 @@ if (!class_exists('dashboard')) {
|
||||
$sql = "select * from v_".$this->table." ";
|
||||
$sql .= "where dashboard_uuid in (".implode(', ', $uuids).") ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
$rows = $database->select($sql, $parameters ?? null, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
$x = 0;
|
||||
foreach ($rows as $row) {
|
||||
@@ -218,7 +218,7 @@ if (!class_exists('dashboard')) {
|
||||
$array[$this->table][$x] = $row;
|
||||
|
||||
//add copy to the description
|
||||
$array[$this->table][$x][dashboard.'_uuid'] = uuid();
|
||||
$array[$this->table][$x]['dashboard_uuid'] = uuid();
|
||||
$array[$this->table][$x][$this->description_field] = trim($row[$this->description_field]).' ('.$text['label-copy'].')';
|
||||
|
||||
//increment the id
|
||||
|
||||
Reference in New Issue
Block a user