...
|
...
|
@@ -43,13 +43,29 @@ class Folder extends Base { |
|
|
);
|
|
|
|
|
|
$data = [];
|
|
|
foreach ($emails as $eid=>$email){
|
|
|
if (empty($data[$email])){
|
|
|
$data[$email] = [];
|
|
|
}
|
|
|
|
|
|
foreach ($folders as $k=>$folder){
|
|
|
if (empty($data[$emails[$folder['email_id']]])){
|
|
|
$data[$emails[$folder['email_id']]] = [];
|
|
|
if($folder['email_id'] == $eid){
|
|
|
unset($folder['email_id']);
|
|
|
$data[$email][$k] = $folder;
|
|
|
}
|
|
|
}
|
|
|
$data[$emails[$folder['email_id']]][$k] = $folder;
|
|
|
unset($data[$emails[$folder['email_id']]][$k]['email_id']);
|
|
|
// 没有存在数据
|
|
|
if(!$data[$email]){
|
|
|
$data[$email][] = [
|
|
|
'folder' => folderAlias('INBOX'),
|
|
|
'id' => 0,
|
|
|
'exsts' => 0,
|
|
|
'unseen' => 0,
|
|
|
'pid' => 0
|
|
|
];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$folders = $data;$data = null;
|
|
|
|
|
|
foreach ($folders as $f=>$folder){
|
...
|
...
|
|