正在显示
1 个修改的文件
包含
17 行增加
和
13 行删除
@@ -57,34 +57,38 @@ class Home extends Base { | @@ -57,34 +57,38 @@ class Home extends Base { | ||
57 | $where = ['email_id'=>$this->getEmails('id')]; | 57 | $where = ['email_id'=>$this->getEmails('id')]; |
58 | 58 | ||
59 | 59 | ||
60 | - $folder_id = []; | 60 | + $folder_id = ['-']; |
61 | if (app()->requestArr('folder_id')){ | 61 | if (app()->requestArr('folder_id')){ |
62 | $folder_id = app()->requestArr('folder_id'); | 62 | $folder_id = app()->requestArr('folder_id'); |
63 | }else{ | 63 | }else{ |
64 | // 目录 | 64 | // 目录 |
65 | $folder = app()->request('folder','收件箱'); | 65 | $folder = app()->request('folder','收件箱'); |
66 | - $folderList = db()->all(folderSql::all($where['email_id'])); | ||
67 | - | ||
68 | - // 文件夹id | ||
69 | - if($folderList){ | ||
70 | - foreach ($folderList as $item){ | ||
71 | - if( | ||
72 | - // 数组文件夹 | ||
73 | - (is_array($folder) && in_array($item['folder'],$folder)) | ||
74 | - || $item['folder'] == $folder | ||
75 | - ){ | ||
76 | - $folder_id[] = $item['id']; | 66 | + if($folder !== true){ |
67 | + $folderList = db()->all(folderSql::all($where['email_id'])); | ||
68 | + | ||
69 | + // 文件夹id | ||
70 | + if($folderList){ | ||
71 | + foreach ($folderList as $item){ | ||
72 | + if( | ||
73 | + // 数组文件夹 | ||
74 | + (is_array($folder) && in_array($item['folder'],$folder)) | ||
75 | + || $item['folder'] == $folder | ||
76 | + ){ | ||
77 | + $folder_id[] = $item['id']; | ||
78 | + } | ||
77 | } | 79 | } |
78 | } | 80 | } |
79 | } | 81 | } |
82 | + | ||
80 | } | 83 | } |
81 | 84 | ||
82 | if(!$folder_id){ | 85 | if(!$folder_id){ |
83 | app()->e('folder_not_fount'); | 86 | app()->e('folder_not_fount'); |
84 | } | 87 | } |
88 | + $folder_id = array_filter($folder_id,'is_int'); | ||
85 | 89 | ||
86 | //目录 | 90 | //目录 |
87 | - $where['folder_id'] = $folder_id; | 91 | + if($folder_id) $where['folder_id'] = $folder_id; |
88 | if($ids) $where['id'] = $ids; | 92 | if($ids) $where['id'] = $ids; |
89 | 93 | ||
90 | if(paramHas('attachment')){ | 94 | if(paramHas('attachment')){ |
-
请 注册 或 登录 后发表评论