正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
@@ -105,14 +105,15 @@ function sync($email_id){ | @@ -105,14 +105,15 @@ function sync($email_id){ | ||
105 | $ids = $db->all("select `id`,`uid` from ".\Model\listsSql::$table." where `email_id` = {$email_id} and `folder_id` = {$folder_id} limit 100 offset ".($page*100)); | 105 | $ids = $db->all("select `id`,`uid` from ".\Model\listsSql::$table." where `email_id` = {$email_id} and `folder_id` = {$folder_id} limit 100 offset ".($page*100)); |
106 | $page++; | 106 | $page++; |
107 | if($ids){ | 107 | if($ids){ |
108 | - $ids = array_column($ids,'id','uid'); | ||
109 | try { | 108 | try { |
110 | - $result = $mailServer->client->fetch(array_keys($ids),'UID',true); | 109 | + $result = $mailServer->client->fetch(array_column($ids,'uid'),'UID',true); |
111 | $result = array_column($result,'UID'); | 110 | $result = array_column($result,'UID'); |
112 | }catch (Throwable $e){ | 111 | }catch (Throwable $e){ |
113 | return 0; | 112 | return 0; |
114 | } | 113 | } |
115 | - foreach ($ids as $uid=>$id){ | 114 | + foreach ($ids as $id){ |
115 | + $uid = $id['uid']; | ||
116 | + $id = $id['id']; | ||
116 | if(!isset($result[$uid])){ | 117 | if(!isset($result[$uid])){ |
117 | _echo('删除 e '.$email_id.' f '.$folder_id.' u '.$uid.' id '.$id.' d '.$db->delete(\Model\listsSql::$table,['id'=>$id]).' fd '.$db->delete('fob_hot_mail',['lists_id'=>$id]).' body '.$db->delete(\Model\bodySql::$table,['lists_id'=>$id])); | 118 | _echo('删除 e '.$email_id.' f '.$folder_id.' u '.$uid.' id '.$id.' d '.$db->delete(\Model\listsSql::$table,['id'=>$id]).' fd '.$db->delete('fob_hot_mail',['lists_id'=>$id]).' body '.$db->delete(\Model\bodySql::$table,['lists_id'=>$id])); |
118 | // 删除 如果远程没有,就删除本地 | 119 | // 删除 如果远程没有,就删除本地 |
-
请 注册 或 登录 后发表评论