aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'start.php')
-rw-r--r--start.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/start.php b/start.php
index 14c64b426..21f79c9fa 100644
--- a/start.php
+++ b/start.php
@@ -278,7 +278,8 @@ function event_calendar_entity_menu_setup($hook, $type, $return, $params) {
}
$user_guid = elgg_get_logged_in_user_guid();
if ($user_guid) {
- if (event_calendar_personal_can_manage($entity,$user_guid)) {
+ $calendar_status = event_calendar_personal_can_manage($entity,$user_guid);
+ if ($calendar_status == 'open') {
if (event_calendar_has_personal_event($entity->guid,$user_guid)) {
$options = array(
'name' => 'personal_calendar',
@@ -299,7 +300,7 @@ function event_calendar_entity_menu_setup($hook, $type, $return, $params) {
);
$return[] = ElggMenuItem::factory($options); }
}
- } else {
+ } else if ($calendar_status == 'closed') {
if (!event_calendar_has_personal_event($entity->guid,$user_guid) && !check_entity_relationship($user_guid, 'event_calendar_request', $entity->guid)) {
$options = array(
'name' => 'personal_calendar',