diff --git a/modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc b/modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc index 10aa362..d8657d7 100644 --- a/modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc +++ b/modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc @@ -3,10 +3,13 @@ * @file * Display maximum slots for an entity. */ -class registration_handler_field_entity_capacity_used extends views_handler_field_entity { +class registration_handler_field_entity_capacity_used extends views_handler_field_numeric { function render($values) { - $entity = $this->get_value($values); - list($entity_id) = entity_extract_ids($this->entity_type, $entity); - return (int) registration_event_count($this->entity_type, $entity_id); + $entity_id = $this->get_value($values); + $table = $this->table; + $alias = $this->field_alias; + $slots_used = (int) registration_event_count($table, $entity_id); + $values->$alias = $slots_used; + return parent::render($values); } }