正在显示
1 个修改的文件
包含
21 行增加
和
20 行删除
| @@ -191,31 +191,32 @@ class MailListV2 extends Base { | @@ -191,31 +191,32 @@ class MailListV2 extends Base { | ||
| 191 | $sql = "select %s from `lists` where ".dbWhere($where); | 191 | $sql = "select %s from `lists` where ".dbWhere($where); |
| 192 | 192 | ||
| 193 | /************ 2024-09-02 *************/ | 193 | /************ 2024-09-02 *************/ |
| 194 | - // 模糊标题搜索 | ||
| 195 | - $subject = app()->request('subject'); | ||
| 196 | - if($subject){ | ||
| 197 | - $subject = is_array($subject) ? $subject : [$subject]; | ||
| 198 | - foreach ($subject as $k=>$sub){ | ||
| 199 | - $subject[$k] = '`subject` '.(empty($is_auto_inbox)?' not ':'').'like "'.$this->getLikeStr($sub).'"'; | 194 | + if($folder=='收件箱') { |
| 195 | + // 模糊标题搜索 | ||
| 196 | + $subject = app()->request('subject'); | ||
| 197 | + if ($subject) { | ||
| 198 | + $subject = is_array($subject) ? $subject : [$subject]; | ||
| 199 | + foreach ($subject as $k => $sub) { | ||
| 200 | + $subject[$k] = '`subject` ' . (empty($is_auto_inbox) ? ' not ' : '') . 'like "' . $this->getLikeStr($sub) . '"'; | ||
| 201 | + } | ||
| 200 | } | 202 | } |
| 201 | - } | ||
| 202 | - // 不在此邮箱中的 | ||
| 203 | - $from_not_in_like = app()->request('from_not_in_like'); | ||
| 204 | - if($from_not_in_like){ | ||
| 205 | - $from_not_in_like = is_array($from_not_in_like) ? $from_not_in_like : [$from_not_in_like]; | ||
| 206 | - foreach ($from_not_in_like as $k=>$sub){ | ||
| 207 | - $from_not_in_like[$k] = '`from` '.(empty($is_auto_inbox)?' not ':'').'like "'.$this->getLikeStr($sub).'"'; | 203 | + // 不在此邮箱中的 |
| 204 | + $from_not_in_like = app()->request('from_not_in_like'); | ||
| 205 | + if ($from_not_in_like) { | ||
| 206 | + $from_not_in_like = is_array($from_not_in_like) ? $from_not_in_like : [$from_not_in_like]; | ||
| 207 | + foreach ($from_not_in_like as $k => $sub) { | ||
| 208 | + $from_not_in_like[$k] = '`from` ' . (empty($is_auto_inbox) ? ' not ' : '') . 'like "' . $this->getLikeStr($sub) . '"'; | ||
| 209 | + } | ||
| 208 | } | 210 | } |
| 209 | - } | ||
| 210 | 211 | ||
| 211 | - if($subject || $from_not_in_like){ | ||
| 212 | - $sql .= ' and ('; | ||
| 213 | - if($subject) $sql.= implode(empty($is_auto_inbox)?' and ':' or ',$subject); | ||
| 214 | - if($from_not_in_like) $sql.= ' and ('.implode(empty($is_auto_inbox)?' and ':' or ',$from_not_in_like).')'; | ||
| 215 | - $sql .= ')'; | 212 | + if ($subject || $from_not_in_like) { |
| 213 | + $sql .= ' and ('; | ||
| 214 | + if ($subject) $sql .= implode(empty($is_auto_inbox) ? ' and ' : ' or ', $subject); | ||
| 215 | + if ($from_not_in_like) $sql .= ' and (' . implode(empty($is_auto_inbox) ? ' and ' : ' or ', $from_not_in_like) . ')'; | ||
| 216 | + $sql .= ')'; | ||
| 217 | + } | ||
| 216 | } | 218 | } |
| 217 | 219 | ||
| 218 | - | ||
| 219 | /************ 2024-09-02 *************/ | 220 | /************ 2024-09-02 *************/ |
| 220 | 221 | ||
| 221 | // 查询列表数据 | 222 | // 查询列表数据 |
-
请 注册 或 登录 后发表评论