Allow 'all' keyword in getfields.options
authorColeman Watts <coleman@civicrm.org>
Thu, 11 Jul 2013 03:56:21 +0000 (20:56 -0700)
committerColeman Watts <coleman@civicrm.org>
Thu, 11 Jul 2013 03:56:21 +0000 (20:56 -0700)
api/v3/Generic.php

index 050a077ca89ae96668065f0d47976e7722187d95..2d5b6fb431c5fbf83ed0be81522fc46664af8048 100644 (file)
@@ -246,7 +246,7 @@ function _civicrm_api3_generic_get_metadata_options(&$metadata, $entity, $fieldn
     return;
   }
 
-  if (!empty($metadata[$fieldname]['options']) || !in_array($fieldname, $fieldsToResolve)) {
+  if (!empty($metadata[$fieldname]['options']) || (!in_array($fieldname, $fieldsToResolve) && !in_array('all', $fieldsToResolve))) {
     return;
   }