Exemple #1
0
 /**
  * Function to support legacy format for groups and tags.
  *
  * @param string $id
  * @param array|int $values
  *
  */
 public static function legacyConvertFormValues($id, &$values)
 {
     $legacyElements = array('group', 'tag', 'contact_tags', 'contact_type', 'membership_type_id', 'membership_status_id');
     if (in_array($id, $legacyElements) && is_array($values)) {
         // prior to 4.7, formValues for some attributes (e.g. group, tag) are stored in array(id1 => 1, id2 => 1),
         // as per the recent Search fixes $values need to be in standard array(id1, id2) format
         $values = CRM_Utils_Array::convertCheckboxFormatToArray($values);
     }
 }