}
public static function customGroup($type = CRM_Core_Permission::VIEW, $reset = FALSE) {
- $customGroups = CRM_Core_PseudoConstant::customGroup($reset);
+ $customGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id', array('fresh' => $reset));
$defaultGroups = array();
// check if user has all powerful permission
}
public static function ufGroup($type = CRM_Core_Permission::VIEW) {
- $ufGroups = CRM_Core_PseudoConstant::ufGroup();
+ $ufGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
$allGroups = array_keys($ufGroups);
if (!$eventID) {
return $permissionedEvents;
}
- return array_search($eventID, $permissionedEvents) === FALSE ? NULL : $eventID;
+ if (!empty($permissionedEvents)){
+ return array_search($eventID, $permissionedEvents) === FALSE ? NULL : $eventID;
+ } else {
+ return $eventID;
+ }
}
static function eventClause($type = CRM_Core_Permission::VIEW, $prefix = NULL) {