* eMail: some servers do not correctly report the UNSEEN counter (they report 0->imap.strato.de), so we count ourself by filtering for UNSEEN Messages; we may however get misleading results if the server does not properly support filtering by flags

This commit is contained in:
Klaus Leithoff 2010-12-07 10:14:24 +00:00
parent 7b7b557d3b
commit ad747da115

View File

@ -1371,6 +1371,11 @@
$retValue['uidnext'] = $folderStatus['UIDNEXT'];
$retValue['uidvalidity'] = $folderStatus['UIDVALIDITY'];
$retValue['unseen'] = $folderStatus['UNSEEN'];
if ($retValue['unseen']==0) // some servers dont serve the UNSEEN information
{
$sortResult = $this->getSortedList($_folderName, $_sort=0, $_reverse=1, $_filter=array('status'=>'UNSEEN'));
$retValue['unseen'] = count($sortResult);
}
}
return $retValue;