作者 邓超

x

... ... @@ -135,16 +135,30 @@ class MailListV2 extends Base {
$where['seen'] = $seen;
}
}
// 搜索标题
$keyword = app()->request('keyword');
if($keyword){
$where['subject.like'] = "%".addcslashes($keyword,"%'\"")."%";
}
// 联系人
$address = app()->request('address');
if($address){
if(is_array($address)){
// 发贱人
if(Verify::sEmail($address['from']??'')){
if($folder=='发件箱'){
$where['to'] = $address['from'];
}else{
$where['from'] = $address['from'];
}
}
}
}
// 星标就不加文件夹赛选
if(empty($where['flagged'])){
// $folder_id = $this->getFolderId($folder);
//目录
// $where['folder_id'] = $folder_id;
$where['_'] = trim(trim($this->assignSql($folder)),'and');
}else{
// $where['lists|email_id'] = $this->getEmails('id');
$where['_'] = trim(trim($this->assignSql2()),'and');
}
... ... @@ -158,10 +172,6 @@ class MailListV2 extends Base {
// 软删
$where['deleted'] = 0;
// $where['from.notin'] = $this->from_not_in();
// $where['_'] = "`from` not like 'postmaster@%%'";
// if(!$where['from.notin']) unset($where['from.notin']);
$filed = '`id`,`uid`,`subject`,`from`,`from_name`,`flagged`,`seen`,`udate`,`folder_id`,`is_file`,`description`,`lists`.`email_id`,`to_name`';
$sql = "select %s from `lists` where ".dbWhere($where);
... ...