From aac086bf919e8866de06f36a2fab884f1ec6046d Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 24 Jul 2019 19:29:45 +0000 Subject: [PATCH] "all" contacts shouldn't show archived contacts --- src/Module/Contact.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Module/Contact.php b/src/Module/Contact.php index dfa0b0659c..6eb46d9d5a 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -668,19 +668,19 @@ class Contact extends BaseModule switch ($type) { case 'blocked': - $sql_extra = " AND `blocked` = 1"; + $sql_extra = " AND `blocked`"; break; case 'hidden': - $sql_extra = " AND `hidden` = 1 AND `blocked` = 0"; + $sql_extra = " AND `hidden` AND NOT `blocked`"; break; case 'ignored': - $sql_extra = " AND `readonly` = 1 AND `blocked` = 0"; + $sql_extra = " AND `readonly` AND NOT `blocked`"; break; case 'archived': - $sql_extra = " AND `archive` = 1 AND `blocked` = 0"; + $sql_extra = " AND `archive` AND NOT `blocked`"; break; default: - $sql_extra = " AND `blocked` = 0"; + $sql_extra = " AND NOT `archive` AND NOT `blocked`"; } $sql_extra .= sprintf(" AND `network` != '%s' ", Protocol::PHANTOM); -- 2.39.5