mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Resolve #281
This commit is contained in:
parent
1934360cf4
commit
ec6a79d9d6
1 changed files with 12 additions and 17 deletions
|
|
@ -913,26 +913,21 @@ class MailClient
|
|||
{
|
||||
$aSearchedUids = $this->GetUids($oParams->oCacher, $sSearch,
|
||||
$oMessageCollection->FolderName, $oMessageCollection->FolderHash);
|
||||
|
||||
if (\count($aSearchedUids))
|
||||
{
|
||||
$aNewUids = array();
|
||||
foreach ($aUids as $iUid)
|
||||
{
|
||||
if ($bUseThreads && !$oParams->iThreadUid) {
|
||||
$aUids = \array_filter($aUids, function($iUid) use ($aSearchedUids, $aAllThreads) {
|
||||
if (\in_array($iUid, $aSearchedUids)) {
|
||||
$aNewUids[] = $iUid;
|
||||
} else if ($bUseThreads && !$oParams->iThreadUid) {
|
||||
foreach ($aAllThreads as $aMap) {
|
||||
if (\in_array($iUid, $aMap) && \array_intersect($aSearchedUids, $aMap)) {
|
||||
$aNewUids[] = $iUid;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
foreach ($aAllThreads as $aMap) {
|
||||
if (\in_array($iUid, $aMap) && \array_intersect($aSearchedUids, $aMap)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$aUids = \array_unique($aNewUids);
|
||||
unset($aNewUids);
|
||||
});
|
||||
} else {
|
||||
$aUids = \array_filter($aUids, function($iUid) use ($aSearchedUids) {
|
||||
return \in_array($iUid, $aSearchedUids);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue