From 239ed37700eaed162276de7ac392a0a9f9756d7a Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 13 May 2016 16:20:22 +1200 Subject: [PATCH] CodeClean - stop mangling orderBy into WHERE --- CRM/Contact/Page/AJAX.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php index 0750017da1..2983e97720 100644 --- a/CRM/Contact/Page/AJAX.php +++ b/CRM/Contact/Page/AJAX.php @@ -762,35 +762,35 @@ LIMIT {$offset}, {$rowCount} if (!empty($columnDetails)) { switch ($columnDetails['data']) { case 'src': - $whereClause .= " ORDER BY cc1.display_name {$dir}"; + $orderByClause = " ORDER BY cc1.display_name {$dir}"; break; case 'src_email': - $whereClause .= " ORDER BY ce1.email {$dir}"; + $orderByClause = " ORDER BY ce1.email {$dir}"; break; case 'src_street': - $whereClause .= " ORDER BY ca1.street_address {$dir}"; + $orderByClause = " ORDER BY ca1.street_address {$dir}"; break; case 'src_postcode': - $whereClause .= " ORDER BY ca1.postal_code {$dir}"; + $orderByClause = " ORDER BY ca1.postal_code {$dir}"; break; case 'dst': - $whereClause .= " ORDER BY cc2.display_name {$dir}"; + $orderByClause = " ORDER BY cc2.display_name {$dir}"; break; case 'dst_email': - $whereClause .= " ORDER BY ce2.email {$dir}"; + $orderByClause = " ORDER BY ce2.email {$dir}"; break; case 'dst_street': - $whereClause .= " ORDER BY ca2.street_address {$dir}"; + $orderByClause = " ORDER BY ca2.street_address {$dir}"; break; case 'dst_postcode': - $whereClause .= " ORDER BY ca2.postal_code {$dir}"; + $orderByClause = " ORDER BY ca2.postal_code {$dir}"; break; default: @@ -798,7 +798,7 @@ LIMIT {$offset}, {$rowCount} } } - $dupePairs = CRM_Core_BAO_PrevNextCache::retrieve($cacheKeyString, $join, $whereClause, $offset, $rowCount, $select); + $dupePairs = CRM_Core_BAO_PrevNextCache::retrieve($cacheKeyString, $join, $whereClause, $offset, $rowCount, $select, $orderByClause); $iFilteredTotal = CRM_Core_DAO::singleValueQuery("SELECT FOUND_ROWS()"); $count = 0; -- 2.25.1