+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
'label' => $typeValue['label'],
'value' => $value,
'type' => $typeValue['type'],
+ 'fieldID' => $typeValue['fieldID'],
);
}
$customGroups[$dao->groupTitle] = $customGroup;
FROM civicrm_custom_group cg,
civicrm_custom_field cf
WHERE cf.custom_group_id = cg.id
-AND cg.extends = 'Activity'";
+AND cg.extends = 'Activity'
+AND " . CRM_Core_Permission::customGroupClause(CRM_Core_Permission::VIEW, 'cg.');
if ($activityTypeID) {
$query .= "AND ( cg.extends_entity_column_value IS NULL OR cg.extends_entity_column_value LIKE '%" . CRM_Core_DAO::VALUE_SEPARATOR . "%1" . CRM_Core_DAO::VALUE_SEPARATOR . "%' )";