mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Contacts - List: Only retrieve a single Primary attachment, in the chance that multiple exist.
This commit is contained in:
@@ -245,7 +245,7 @@
|
||||
|
||||
//get the list
|
||||
$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 .= "where true ";
|
||||
if ($show != "all" || !permission_exists('contact_all')) {
|
||||
|
||||
Reference in New Issue
Block a user