CRM-21057: pass limit to retrieve all mapping values
authorBrian Shaughnessy <brian@lcdservices.biz>
Fri, 11 Aug 2017 02:23:40 +0000 (22:23 -0400)
committerBrian Shaughnessy <brian@lcdservices.biz>
Fri, 11 Aug 2017 02:23:40 +0000 (22:23 -0400)
CRM/Core/BAO/Mapping.php

index 4aeb934a1cf1f3cbbdcc155283a329f13a46214d..dd0710a6dfa41eeb9a368980cd8e4460f72b19fb 100644 (file)
@@ -115,7 +115,13 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
    *   Array of mapping names, keyed by id.
    */
   public static function getMappings($mappingType) {
-    $result = civicrm_api3('Mapping', 'get', array('mapping_type_id' => $mappingType, 'options' => array('sort' => 'name')));
+    $result = civicrm_api3('Mapping', 'get', array(
+      'mapping_type_id' => $mappingType,
+      'options' => array(
+        'sort' => 'name',
+        'limit' => 0,
+      ),
+    ));
     $mapping = array();
 
     foreach ($result['values'] as $key => $value) {