aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar/container.php
diff options
context:
space:
mode:
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) {