Olq query removed, checking for deleted as well

This commit is contained in:
Michael 2021-10-13 05:11:36 +00:00
parent 27b9da3df5
commit 2904f4ca0e
2 changed files with 2 additions and 16 deletions

View file

@ -3022,7 +3022,7 @@ class Contact
$networks[] = Protocol::OSTATUS;
}
$condition = ['network' => $networks, 'failed' => false, 'uid' => $uid];
$condition = ['network' => $networks, 'failed' => false, 'deleted' => false, 'uid' => $uid];
// check if we search only communities or every contact
if ($mode === 'community') {
@ -3032,7 +3032,7 @@ class Contact
$search .= '%';
$condition = DBA::mergeConditions($condition,
["(NOT `unsearchable` OR `nurl` IN (SELECT `nurl` FROM `owner-view` where `publish` OR `net-publish`))
["(NOT `unsearchable` OR `nurl` IN (SELECT `nurl` FROM `owner-view` WHERE `publish` OR `net-publish`))
AND (`addr` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?)", $search, $search, $search]);
$contacts = self::selectToArray([], $condition);