From db347db3a2cedcfafaffba7fe220f34a33effd87 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Thu, 10 May 2012 17:31:28 +0200 Subject: attempt to revive add_to_group feature --- models/model.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'models') diff --git a/models/model.php b/models/model.php index 287adee54..042d21736 100644 --- a/models/model.php +++ b/models/model.php @@ -970,7 +970,17 @@ $count = false, $region='-', $meta_max = '', $annotation_name = '') if ($limit) { $query .= " limit $offset, $limit"; // Add order and limit } - return get_data($query, "entity_row_to_elggstar"); + $entities = get_data($query, "entity_row_to_elggstar"); + if (elgg_get_plugin_setting('add_to_group_calendar', 'event_calendar') == 'yes') { + if (get_entity($container_guid) instanceOf ElggGroup) { + $entities = event_calendar_get_entities_from_metadata_between_related($meta_start_name, $meta_end_name, + $meta_start_value, $meta_end_value, $entity_type, + $entity_subtype, $owner_guid, $container_guid, + 0, 0, "", 0, + false, false, '-',$entities); + } + } + return $entities; } else { if ($row = get_data_row($query)) return $row->total; -- cgit v1.2.3