aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-05-09 19:09:24 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2012-05-09 19:09:24 +0200
commitcea13ac10598078a6489650bf69c6efc45231e03 (patch)
tree25af2cf7bab261963301df88f6c479af5b371f6b /views/default/event_calendar
parent7f1d64ed5f005e701af71023798346193a445401 (diff)
downloadelgg-cea13ac10598078a6489650bf69c6efc45231e03.tar.gz
elgg-cea13ac10598078a6489650bf69c6efc45231e03.tar.bz2
fixes for group event bugs
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