initial commit; version 22.5.12042

This commit is contained in:
2022-12-12 23:28:25 -05:00
commit af1b03d79f
17653 changed files with 22692970 additions and 0 deletions

15
update/454.php Normal file
View File

@ -0,0 +1,15 @@
<?php
$alerts = dbFetchRows("SELECT * FROM `alert_table` WHERE `device_id` = 0");
echo ("Fixing alert_table device_id: ");
foreach($alerts AS $alert)
{
if($alert['device_id'] == '0' && $device_id = get_device_id_by_entity_id($alert['entity_id'], $alert['entity_type'])) {
dbUpdate(['device_id' => $device_id], 'alert_table', '`alert_table_id` = ?', [$alert['alert_table_id']]);
echo ".";
} else { echo "!"; }
}
echo PHP_EOL;