mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
only check for unseen messages of the last 14 days, when checking for new mails per folder; use new parameter to avoid poisoning the cache of the message list
This commit is contained in:
parent
84713fbab3
commit
f413b9dc4b
@ -174,7 +174,10 @@ class notifications_ajax {
|
||||
$this->session_data['notified_mail_uids'][$notify_folder] = array();
|
||||
}
|
||||
$folder_status[$notify_folder] = $bofelamimail->getFolderStatus($notify_folder);
|
||||
$headers = $bofelamimail->getHeaders($notify_folder, 1, false, 0, true, array('status'=>'UNSEEN'));
|
||||
$cutoffdate = time();
|
||||
$cutoffdate = $cutoffdate - (60*60*24*14); // last 14 days
|
||||
$_filter = array('status'=>'UNSEEN','type'=>"SINCE",'string'=> date("d-M-Y", $cutoffdate));
|
||||
$headers = $bofelamimail->getHeaders($notify_folder, 1, false, 0, true, $_filter,true,false);
|
||||
if(is_array($headers['header']) && count($headers['header']) > 0) {
|
||||
foreach($headers['header'] as $id=>$header) {
|
||||
// check if unseen mail has already been notified
|
||||
|
Loading…
Reference in New Issue
Block a user