From d08086c8b282fc924d7e66cdf47ff5f4d5726376 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 3 Dec 2010 10:44:47 +0000 Subject: [PATCH] * Notifications: fix dont try to notify when none is set/forced for folders to check for new mails; dont try to notify when email as module is not enabled for the particular user --- notifications/inc/class.notifications_ajax.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/notifications/inc/class.notifications_ajax.inc.php b/notifications/inc/class.notifications_ajax.inc.php index db0f324540..68e1a78183 100644 --- a/notifications/inc/class.notifications_ajax.inc.php +++ b/notifications/inc/class.notifications_ajax.inc.php @@ -112,7 +112,7 @@ class notifications_ajax { * @return xajax response */ public function get_notifications() { - $this->check_mailbox(); + if ($GLOBALS['egw_info']['user']['apps']['felamimail']) $this->check_mailbox(); $this->get_egwpopup(); return $this->response->getXML(); @@ -124,7 +124,8 @@ class notifications_ajax { * @return boolean true or false */ private function check_mailbox() { - if(!isset($this->preferences[self::_mailappname]['notify_folders'])) { + //error_log(__METHOD__.__LINE__.array2string($this->preferences[self::_mailappname]['notify_folders'])); + if(!isset($this->preferences[self::_mailappname]['notify_folders'])||$this->preferences[self::_mailappname]['notify_folders']=='none') { return true; //no pref set for notifying - exit } $notify_folders = explode(',', $this->preferences[self::_mailappname]['notify_folders']);