正在显示
1 个修改的文件
包含
19 行增加
和
9 行删除
| @@ -135,16 +135,30 @@ class MailListV2 extends Base { | @@ -135,16 +135,30 @@ class MailListV2 extends Base { | ||
| 135 | $where['seen'] = $seen; | 135 | $where['seen'] = $seen; |
| 136 | } | 136 | } |
| 137 | } | 137 | } |
| 138 | + // 搜索标题 | ||
| 139 | + $keyword = app()->request('keyword'); | ||
| 140 | + if($keyword){ | ||
| 141 | + $where['subject.like'] = "%".addcslashes($keyword,"%'\"")."%"; | ||
| 142 | + } | ||
| 143 | + // 联系人 | ||
| 144 | + $address = app()->request('address'); | ||
| 145 | + if($address){ | ||
| 146 | + if(is_array($address)){ | ||
| 147 | + // 发贱人 | ||
| 148 | + if(Verify::sEmail($address['from']??'')){ | ||
| 149 | + if($folder=='发件箱'){ | ||
| 150 | + $where['to'] = $address['from']; | ||
| 151 | + }else{ | ||
| 152 | + $where['from'] = $address['from']; | ||
| 153 | + } | ||
| 154 | + } | ||
| 155 | + } | ||
| 156 | + } | ||
| 138 | 157 | ||
| 139 | // 星标就不加文件夹赛选 | 158 | // 星标就不加文件夹赛选 |
| 140 | if(empty($where['flagged'])){ | 159 | if(empty($where['flagged'])){ |
| 141 | -// $folder_id = $this->getFolderId($folder); | ||
| 142 | - | ||
| 143 | - //目录 | ||
| 144 | -// $where['folder_id'] = $folder_id; | ||
| 145 | $where['_'] = trim(trim($this->assignSql($folder)),'and'); | 160 | $where['_'] = trim(trim($this->assignSql($folder)),'and'); |
| 146 | }else{ | 161 | }else{ |
| 147 | -// $where['lists|email_id'] = $this->getEmails('id'); | ||
| 148 | $where['_'] = trim(trim($this->assignSql2()),'and'); | 162 | $where['_'] = trim(trim($this->assignSql2()),'and'); |
| 149 | } | 163 | } |
| 150 | 164 | ||
| @@ -158,10 +172,6 @@ class MailListV2 extends Base { | @@ -158,10 +172,6 @@ class MailListV2 extends Base { | ||
| 158 | // 软删 | 172 | // 软删 |
| 159 | $where['deleted'] = 0; | 173 | $where['deleted'] = 0; |
| 160 | 174 | ||
| 161 | -// $where['from.notin'] = $this->from_not_in(); | ||
| 162 | -// $where['_'] = "`from` not like 'postmaster@%%'"; | ||
| 163 | -// if(!$where['from.notin']) unset($where['from.notin']); | ||
| 164 | - | ||
| 165 | $filed = '`id`,`uid`,`subject`,`from`,`from_name`,`flagged`,`seen`,`udate`,`folder_id`,`is_file`,`description`,`lists`.`email_id`,`to_name`'; | 175 | $filed = '`id`,`uid`,`subject`,`from`,`from_name`,`flagged`,`seen`,`udate`,`folder_id`,`is_file`,`description`,`lists`.`email_id`,`to_name`'; |
| 166 | 176 | ||
| 167 | $sql = "select %s from `lists` where ".dbWhere($where); | 177 | $sql = "select %s from `lists` where ".dbWhere($where); |
-
请 注册 或 登录 后发表评论