"only responding to after_navbar hook, if notifications is enabled for the user, since after_navbar get's called regardless of applicaton permissions"

This commit is contained in:
Ralf Becker 2009-08-25 11:22:04 +00:00
parent bcfe710de2
commit 46b4c081a1

View File

@ -13,7 +13,8 @@
* @version $Id$ * @version $Id$
*/ */
$notification_config = config::read('notifications'); $notification_config = config::read('notifications');
if ($notification_config['popup_enable']) { if ($notification_config['popup_enable'] && $GLOBALS['egw_info']['user']['apps']['notifications'])
{
$GLOBALS['egw']->translation->add_app('notifications'); $GLOBALS['egw']->translation->add_app('notifications');
$popup_poll_interval = empty($notification_config['popup_poll_interval']) ? 60 : $notification_config['popup_poll_interval']; $popup_poll_interval = empty($notification_config['popup_poll_interval']) ? 60 : $notification_config['popup_poll_interval'];
echo '<script src="'. $GLOBALS['egw_info']['server']['webserver_url']. '/notifications/js/notificationajaxpopup.js?'. echo '<script src="'. $GLOBALS['egw_info']['server']['webserver_url']. '/notifications/js/notificationajaxpopup.js?'.