作者 邓超

x

@@ -287,7 +287,7 @@ class MailListV2 extends Base { @@ -287,7 +287,7 @@ class MailListV2 extends Base {
287 if($subject){ 287 if($subject){
288 $subject = is_array($subject) ? $subject : [$subject]; 288 $subject = is_array($subject) ? $subject : [$subject];
289 foreach ($subject as $k=>$sub){ 289 foreach ($subject as $k=>$sub){
290 - $subject[$k] = '`subject` '.(empty($is_auto_inbox)?' not ':'').'like "%%'.addslashes($sub).'%%"'; 290 + $subject[$k] = '`subject` not like "%%'.addslashes($sub).'%%"';
291 } 291 }
292 } 292 }
293 // 不在此邮箱中的 293 // 不在此邮箱中的
@@ -295,14 +295,14 @@ class MailListV2 extends Base { @@ -295,14 +295,14 @@ class MailListV2 extends Base {
295 if($from_not_in_like){ 295 if($from_not_in_like){
296 $from_not_in_like = is_array($from_not_in_like) ? $from_not_in_like : [$from_not_in_like]; 296 $from_not_in_like = is_array($from_not_in_like) ? $from_not_in_like : [$from_not_in_like];
297 foreach ($from_not_in_like as $k=>$sub){ 297 foreach ($from_not_in_like as $k=>$sub){
298 - $from_not_in_like[$k] = '`from` '.(empty($is_auto_inbox)?' not ':'').'like "%%'.addslashes($sub).'%%"'; 298 + $from_not_in_like[$k] = '`from` not like "%%'.addslashes($sub).'%%"';
299 } 299 }
300 } 300 }
301 301
302 if($subject || $from_not_in_like){ 302 if($subject || $from_not_in_like){
303 $sql .= ' ('; 303 $sql .= ' (';
304 - if($subject) $sql.= implode(empty($is_auto_inbox)?' and ':' or ',$subject);  
305 - if($from_not_in_like) $sql.= ' and ('.implode(empty($is_auto_inbox)?' and ':' or ',$from_not_in_like).')'; 304 + if($subject) $sql.= implode(' and ',$subject);
  305 + if($from_not_in_like) $sql.= ' and ('.implode(' and ',$from_not_in_like).')';
306 $sql .= ') and '; 306 $sql .= ') and ';
307 } 307 }
308 308