mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: update notification for users with updates disabled (#7253)
Don't show the toast when the notification is marked as read
This commit is contained in:
2
daily.sh
2
daily.sh
@@ -151,7 +151,7 @@ main () {
|
|||||||
up=$(php daily.php -f update >&2; echo $?)
|
up=$(php daily.php -f update >&2; echo $?)
|
||||||
if [[ "$up" == "0" ]]; then
|
if [[ "$up" == "0" ]]; then
|
||||||
${DAILY_SCRIPT} no-code-update
|
${DAILY_SCRIPT} no-code-update
|
||||||
set_notification update 0 # make sure there are no update notifications if update is disabled
|
set_notification update 1 # make sure there are no update notifications if update is disabled
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -302,7 +302,7 @@ if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `last_polled` <= DATE_ADD(
|
|||||||
$msg_box[] = array('type' => 'warning', 'message' => "<a href=\"poll-log/filter=unpolled/\">It appears as though you have some devices that haven't completed polling within the last 15 minutes, you may want to check that out :)</a>",'title' => 'Devices unpolled');
|
$msg_box[] = array('type' => 'warning', 'message' => "<a href=\"poll-log/filter=unpolled/\">It appears as though you have some devices that haven't completed polling within the last 15 minutes, you may want to check that out :)</a>",'title' => 'Devices unpolled');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (dbFetchRows('SELECT * FROM `notifications` WHERE `severity` > 1') as $notification) {
|
foreach (dbFetchRows('SELECT `notifications`.* FROM `notifications` WHERE NOT exists( SELECT 1 FROM `notifications_attribs` WHERE `notifications`.`notifications_id` = `notifications_attribs`.`notifications_id` AND `notifications_attribs`.`user_id` = ?) AND `severity` > 1', array($_SESSION['user_id'])) as $notification) {
|
||||||
$msg_box[] = array(
|
$msg_box[] = array(
|
||||||
'type' => 'error',
|
'type' => 'error',
|
||||||
'message' => "<a href='notifications/'>${notification['body']}</a>",
|
'message' => "<a href='notifications/'>${notification['body']}</a>",
|
||||||
|
Reference in New Issue
Block a user