From c6f0b6a6bf4ad4a0e1dd42965bd6ff9a704f1af7 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 30 May 2019 00:37:42 -0600 Subject: [PATCH] Update contacts.php --- app/contacts/contacts.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/contacts/contacts.php b/app/contacts/contacts.php index 010599defb..3db46a4848 100644 --- a/app/contacts/contacts.php +++ b/app/contacts/contacts.php @@ -178,15 +178,15 @@ $offset = $rows_per_page * $page; //get the list - $contact_default_sort_col = ($_SESSION['contacts']['default_sort_column']['text'] != '') ? $_SESSION['contacts']['default_sort_column']['text'] : "last_mod_date"; - $contact_default_sort_ord = ($_SESSION['contacts']['default_sort_order']['text'] != '') ? $_SESSION['contacts']['default_sort_order']['text'] : "desc"; + $contact_default_sort_column = ($_SESSION['contacts']['default_sort_column']['text'] != '') ? $_SESSION['contacts']['default_sort_column']['text'] : "last_mod_date"; + $contact_default_sort_order = ($_SESSION['contacts']['default_sort_order']['text'] != '') ? $_SESSION['contacts']['default_sort_order']['text'] : "desc"; $sql = str_replace('count(*) as num_rows', '*, (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); if (strlen($order_by) > 0) { $sql .= "order by ".$order_by." ".$order.", contact_organization asc "; } else { - $sql .= "order by ".$contact_default_sort_col." ".$contact_default_sort_ord." "; + $sql .= "order by ".$contact_default_sort_column." ".$contact_default_sort_order." "; if ($db_type == "pgsql") { $sql .= "nulls last "; }