Maybe fix SQL error from searching contacts with private + duplicates

This commit is contained in:
nathan 2021-11-09 14:33:37 -07:00
parent 97c31b4d54
commit 6aa0366330

View File

@ -338,8 +338,8 @@ class Sql extends Api\Storage
{
if (!$this->grants[(int) $param['owner']]) return false; // we have no access to that addressbook
$filter[$this->table_name.'.contact_owner'] = $param['owner'];
$filter[$this->table_name.'.private'] = 0;
$filter[$this->table_name . '.contact_owner'] = $param['owner'];
$filter[$this->table_name . '.contact_private'] = 0;
$join .= 'a2.contact_owner = ' . $this->db->quote($param['owner']) . ' AND ';
$join .= 'a2.contact_private = ' . $this->db->quote($filter['private']) . ' AND ';
}