Merge pull request #6192 from colemanw/CRM-16825
authorcolemanw <coleman@civicrm.org>
Fri, 10 Jul 2015 15:30:41 +0000 (11:30 -0400)
committercolemanw <coleman@civicrm.org>
Fri, 10 Jul 2015 15:30:41 +0000 (11:30 -0400)
CRM-16825 - Respect quicksearch result count setting

api/v3/Contact.php

index de305dd33181f7ceaf0af069f65b80efe279c342..1e7cfc23fca78621ab83a7e4a74dda0e39483316 100644 (file)
@@ -723,7 +723,7 @@ function civicrm_api3_contact_getquick($params) {
   }
   $from = implode(' ', $from);
   $limit = (int) CRM_Utils_Array::value('limit', $params);
-  $limit = $limit > 0 ? $limit : 10;
+  $limit = $limit > 0 ? $limit : CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME, 'search_autocomplete_count', NULL, 10);
 
   // add acl clause here
   list($aclFrom, $aclWhere) = CRM_Contact_BAO_Contact_Permission::cacheClause('cc');