aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar/container.php
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/container.php
parent7f1d64ed5f005e701af71023798346193a445401 (diff)
downloadelgg-cea13ac10598078a6489650bf69c6efc45231e03.tar.gz
elgg-cea13ac10598078a6489650bf69c6efc45231e03.tar.bz2
fixes for group event bugs
Diffstat (limited to 'views/default/event_calendar/container.php')
-rw-r--r--views/default/event_calendar/container.php6
1 files changed, 5 insertions, 1 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) {