From 5450bf88220776c6fdc46a0f06b5313243588ffa Mon Sep 17 00:00:00 2001 From: monishdeb Date: Mon, 28 Sep 2015 19:03:35 +0530 Subject: [PATCH] format fixes --- CRM/Contact/BAO/Query.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index ed780c0970..24dc59b264 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1572,18 +1572,17 @@ class CRM_Contact_BAO_Query { * @param array|int $values * */ - public static function legacyConvertFormValues($id, &$values) { - if (in_array($id, array('group', 'tag')) && 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 - $ids = array_keys($values, 1); - if (count($ids) > 1 || (count($ids) == 1 && key($values) > 1)) { - $values = $ids; - } - } + public static function legacyConvertFormValues($id, &$values) { + if (in_array($id, array('group', 'tag')) && 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 + $ids = array_keys($values, 1); + if (count($ids) > 1 || (count($ids) == 1 && key($values) > 1)) { + $values = $ids; + } + } } - /** * Fix values from query from/to something no-one cared enough to document. * -- 2.25.1