Merge pull request #7430 from annando/contact-not-archived

"all contacts" shouldn't show archived contacts
This commit is contained in:
Hypolite Petovan 2019-07-24 16:00:41 -04:00 committed by GitHub
commit d75e3e1650
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);