作者 邓超

1

@@ -261,18 +261,18 @@ function sync(){ @@ -261,18 +261,18 @@ function sync(){
261 try { 261 try {
262 if(empty($folder['_child'])){ 262 if(empty($folder['_child'])){
263 // 同步父文件夹 263 // 同步父文件夹
264 - $mailServer->syncMail($id,$folder['id'],$folder['origin_name']); 264 + $mailServer->syncMail($id,$folder['id'],$folder['origin_folder']);
265 }else{ 265 }else{
266 foreach ($folder as $item){ 266 foreach ($folder as $item){
267 // 同步子文件夹 267 // 同步子文件夹
268 - $mailServer->syncMail($id,$item['id'],$folder['origin_name'].'/'.$item['origin_name']); 268 + $mailServer->syncMail($id,$item['id'],$folder['origin_folder'].'/'.$item['origin_folder']);
269 } 269 }
270 } 270 }
271 271
272 }catch (Throwable $e){ 272 }catch (Throwable $e){
273 logs( 273 logs(
274 $e->getMessage(), 274 $e->getMessage(),
275 - LOG_PATH.'/imap/'.$email.'.error.log' 275 + LOG_PATH.'/imap/'.$email['email'].'.error.log'
276 ); 276 );
277 } 277 }
278 } 278 }
@@ -21,7 +21,7 @@ class folderSql { @@ -21,7 +21,7 @@ class folderSql {
21 * @time 2023/2/18 9:22 21 * @time 2023/2/18 9:22
22 */ 22 */
23 public static function all(int $email_id):string { 23 public static function all(int $email_id):string {
24 - return "select `folder`,`pid`,`origin_folder`,`last_sync_time` from `".static::$table."` where `email_id` = {$email_id} order by `id` asc"; 24 + return "select `folder`,`pid`,`origin_folder`,`last_sync_time`,`folder` from `".static::$table."` where `email_id` = {$email_id} order by `id` asc";
25 } 25 }
26 26
27 27