|
@@ -39,8 +39,16 @@ class Home extends Base { |
|
@@ -39,8 +39,16 @@ class Home extends Base { |
39
|
|
39
|
|
40
|
$where = ['email_id' => $this->getEmail('id')];
|
40
|
$where = ['email_id' => $this->getEmail('id')];
|
41
|
|
41
|
|
|
|
42
|
+ foreach ($folder_ids as $k=>$folder_id){
|
|
|
43
|
+ if(!$folder_id){
|
|
|
44
|
+ unset($folder_ids[$k]);
|
|
|
45
|
+ }
|
|
|
46
|
+ }
|
|
|
47
|
+
|
|
|
48
|
+ $folder_ids = array_values($folder_ids);
|
|
|
49
|
+
|
42
|
// 默认查询 inbox
|
50
|
// 默认查询 inbox
|
43
|
- if(!is_array($folder_ids)){
|
51
|
+ if(!is_array($folder_ids) || !$folder_ids){
|
44
|
$folder_ids = db()->value(
|
52
|
$folder_ids = db()->value(
|
45
|
sprintf(
|
53
|
sprintf(
|
46
|
"select `id` from `%s` where `email_id` = %d and `origin_folder` = 'INBOX'",
|
54
|
"select `id` from `%s` where `email_id` = %d and `origin_folder` = 'INBOX'",
|