diff --git a/core/Plugin/Controller.php b/core/Plugin/Controller.php index af58f852ba198f3f95c868494e1a8f0c8a4a3ba1..789c45609785ba27ef8a1484398166ee07def3d7 100644 --- a/core/Plugin/Controller.php +++ b/core/Plugin/Controller.php @@ -564,8 +564,13 @@ abstract class Controller $this->setBasicVariablesView($view); $view->topMenu = MenuTop::getInstance()->getMenu(); - $view->notifications = NotificationManager::getAllNotificationsToDisplay(); - NotificationManager::cancelAllNonPersistent(); + + $notifications = $view->notifications; + if (empty($notifications)) { + $view->notifications = NotificationManager::getAllNotificationsToDisplay(); + NotificationManager::cancelAllNonPersistent(); + } + } catch (Exception $e) { Piwik_ExitWithMessage($e->getMessage(), $e->getTraceAsString()); } diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php index 56051341ab28082c85dfe01a422d167cfc49c607..4f8f885ef97632fc728656f32be9ef1d2f07acab 100644 --- a/core/Plugin/ControllerAdmin.php +++ b/core/Plugin/ControllerAdmin.php @@ -178,8 +178,11 @@ abstract class ControllerAdmin extends Controller $adminMenu = MenuAdmin::getInstance()->getMenu(); $view->adminMenu = $adminMenu; - $view->notifications = NotificationManager::getAllNotificationsToDisplay(); - NotificationManager::cancelAllNonPersistent(); + $notifications = $view->notifications; + if (empty($notifications)) { + $view->notifications = NotificationManager::getAllNotificationsToDisplay(); + NotificationManager::cancelAllNonPersistent(); + } } static public function isDataPurgeSettingsEnabled()