作者 邓超

x

... ... @@ -287,7 +287,7 @@ class MailListV2 extends Base {
if($subject){
$subject = is_array($subject) ? $subject : [$subject];
foreach ($subject as $k=>$sub){
$subject[$k] = '`subject` '.(empty($is_auto_inbox)?' not ':'').'like "%%'.addslashes($sub).'%%"';
$subject[$k] = '`subject` not like "%%'.addslashes($sub).'%%"';
}
}
// 不在此邮箱中的
... ... @@ -295,14 +295,14 @@ class MailListV2 extends Base {
if($from_not_in_like){
$from_not_in_like = is_array($from_not_in_like) ? $from_not_in_like : [$from_not_in_like];
foreach ($from_not_in_like as $k=>$sub){
$from_not_in_like[$k] = '`from` '.(empty($is_auto_inbox)?' not ':'').'like "%%'.addslashes($sub).'%%"';
$from_not_in_like[$k] = '`from` not like "%%'.addslashes($sub).'%%"';
}
}
if($subject || $from_not_in_like){
$sql .= ' (';
if($subject) $sql.= implode(empty($is_auto_inbox)?' and ':' or ',$subject);
if($from_not_in_like) $sql.= ' and ('.implode(empty($is_auto_inbox)?' and ':' or ',$from_not_in_like).')';
if($subject) $sql.= implode(' and ',$subject);
if($from_not_in_like) $sql.= ' and ('.implode(' and ',$from_not_in_like).')';
$sql .= ') and ';
}
... ...