Contacts - List: Only retrieve a single Primary attachment, in the chance that multiple exist.
This commit is contained in:
parent
3de202b987
commit
f6df4fd0b3
|
|
@ -245,7 +245,7 @@
|
||||||
|
|
||||||
//get the list
|
//get the list
|
||||||
$sql = "select *, ";
|
$sql = "select *, ";
|
||||||
$sql .= "(select a.contact_attachment_uuid from v_contact_attachments as a where a.contact_uuid = c.contact_uuid and a.attachment_primary = 1) as contact_attachment_uuid ";
|
$sql .= "(select a.contact_attachment_uuid from v_contact_attachments as a where a.contact_uuid = c.contact_uuid and a.attachment_primary = 1 limit 1) as contact_attachment_uuid ";
|
||||||
$sql .= "from v_contacts as c ";
|
$sql .= "from v_contacts as c ";
|
||||||
$sql .= "where true ";
|
$sql .= "where true ";
|
||||||
if ($show != "all" || !permission_exists('contact_all')) {
|
if ($show != "all" || !permission_exists('contact_all')) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue