From: Kevin Jardine Date: Thu, 10 May 2012 15:31:28 +0000 (+0200) Subject: attempt to revive add_to_group feature X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=db347db3a2cedcfafaffba7fe220f34a33effd87;p=lorea%2Felgg.git attempt to revive add_to_group feature --- 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;