diff --git a/daily.sh b/daily.sh index e98091cc2bd1..c6eca5ab3952 100755 --- a/daily.sh +++ b/daily.sh @@ -151,7 +151,7 @@ main () { up=$(php daily.php -f update >&2; echo $?) if [[ "$up" == "0" ]]; then ${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 fi diff --git a/html/index.php b/html/index.php index c7a6e59b8f55..2505740eb204 100644 --- a/html/index.php +++ b/html/index.php @@ -302,7 +302,7 @@ function popUp(URL) $msg_box[] = array('type' => 'warning', 'message' => "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 :)",'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( 'type' => 'error', 'message' => "${notification['body']}",