check if notifications exist at all
This commit is contained in:
parent
d20efb3caa
commit
9eeb088734
@ -46,16 +46,17 @@ if (empty($aWorkers)) {
|
|||||||
|
|
||||||
// We notified, lets check which recovered
|
// We notified, lets check which recovered
|
||||||
$aNotifications = $notification->getAllActive();
|
$aNotifications = $notification->getAllActive();
|
||||||
foreach ($aNotifications as $aNotification) {
|
if (!empty($aNotifications)) {
|
||||||
$aData = json_decode($aNotification['data'], true);
|
foreach ($aNotifications as $aNotification) {
|
||||||
$aWorker = $worker->getWorker($aData['id']);
|
$aData = json_decode($aNotification['data'], true);
|
||||||
if ($aWorker['active'] == 1) {
|
$aWorker = $worker->getWorker($aData['id']);
|
||||||
if ($notification->setInactive($aNotification['id'])) {
|
if ($aWorker['active'] == 1) {
|
||||||
verbose("Marked notification " . $aNotification['id'] . " as inactive\n");
|
if ($notification->setInactive($aNotification['id'])) {
|
||||||
} else {
|
verbose("Marked notification " . $aNotification['id'] . " as inactive\n");
|
||||||
verbose("Failed to set notification inactive for " . $aWorker['username'] . "\n");
|
} else {
|
||||||
|
verbose("Failed to set notification inactive for " . $aWorker['username'] . "\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user