aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/event_calendar')
-rw-r--r--views/default/event_calendar/container.php6
-rw-r--r--views/default/event_calendar/groupprofile_calendar.php4
2 files changed, 6 insertions, 4 deletions
diff --git a/views/default/event_calendar/container.php b/views/default/event_calendar/container.php
index fdd7da2c6..cb5c8620c 100644
--- a/views/default/event_calendar/container.php
+++ b/views/default/event_calendar/container.php
@@ -1,8 +1,12 @@
<?php
elgg_load_library('elgg:event_calendar');
$site_calendar = elgg_get_plugin_setting('site_calendar', 'event_calendar');
+$group_calendar = elgg_get_plugin_setting('group_calendar', 'event_calendar');
$admin = elgg_is_admin_logged_in();
-$containers = array(0 => elgg_echo('event_calendar:site_calendar'));
+$containers = array();
+if (($site_calendar != 'no') && ($admin || !$site_calendar || ($site_calendar == 'loggedin'))) {
+ $containers[0] = elgg_echo('event_calendar:site_calendar');
+}
$user = elgg_get_logged_in_user_entity();
$groups = $user->getGroups('',0,0);
foreach ($groups as $group) {
diff --git a/views/default/event_calendar/groupprofile_calendar.php b/views/default/event_calendar/groupprofile_calendar.php
index 7ee09104f..c71780be8 100644
--- a/views/default/event_calendar/groupprofile_calendar.php
+++ b/views/default/event_calendar/groupprofile_calendar.php
@@ -26,10 +26,8 @@ if (event_calendar_activated_for_group($page_owner_entity)) {
if (is_array($events) && sizeof($events) > 0) {
foreach($events as $event) {
- echo elgg_view("object/event_calendar",array('entity' => $event));
+ echo elgg_view("object/event_calendar",array('entity' => $event['event']));
}
}
}
-
-?> \ No newline at end of file