Allow folder notification on INBOX only for popup_only chain

This commit is contained in:
Hadi Nategh 2017-10-06 17:38:26 +02:00
parent de65d91dc7
commit 1903025cc9
2 changed files with 9 additions and 1 deletions

View File

@ -1228,6 +1228,11 @@ class admin_mail
$sel_options['acc_folder_junk'] = $sel_options['acc_folder_archive'] =
$sel_options['notify_folders'] = $sel_options['acc_folder_ham'] =
self::mailboxes(self::imap_client ($content));
// Allow folder notification on INBOX for popup_only
if ($GLOBALS['egw_info']['user']['preferences']['notifications']['notification_chain'] == 'popup_only')
{
$sel_options['notify_folders']['INBOX'] = lang('INBOX');
}
}
catch(Exception $e) {
if (self::$debug) _egw_log_exception($e);

View File

@ -522,7 +522,10 @@ class mail_hooks
$recent_messages = array();
$folder_status = array();
foreach($notify_folders as $id=>$notify_folder) {
if (empty($notify_folder)) continue;
// Allow folder notification on INBOX for popup_only chain
if (empty($notify_folder) ||
($notify_folder == 'INBOX' &&
$GLOBALS['egw_info']['user']['preferences']['notifications']['notification_chain'] != 'popup_only')) continue;
if(!is_array($notified_mail_uidsCache[$activeProfile][$notify_folder])) {
$notified_mail_uidsCache[$activeProfile][$notify_folder] = array();
}