From 7f1d64ed5f005e701af71023798346193a445401 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Wed, 9 May 2012 18:06:56 +0200 Subject: fixed default group edit bug --- models/model.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'models') diff --git a/models/model.php b/models/model.php index cf00c4b1c..b3ba4db80 100644 --- a/models/model.php +++ b/models/model.php @@ -1519,11 +1519,14 @@ function event_calendar_get_page_content_edit($page_type,$guid) { if (elgg_instanceof($event, 'object', 'event_calendar') && $event->canEdit()) { $body_vars['event'] = $event; $body_vars['form_data'] = event_calendar_prepare_edit_form_vars($event); + $event_container = get_entity($event->container_guid); if (elgg_instanceof($event_container, 'group')) { elgg_push_breadcrumb(elgg_echo('event_calendar:group_breadcrumb'), 'event_calendar/group/'.$event->container_guid); + $body_vars['group_guid'] = $event_container->guid; } else { elgg_push_breadcrumb(elgg_echo('event_calendar:show_events_title'),'event_calendar/list'); + $body_vars['group_guid'] = 0; } elgg_push_breadcrumb($event->title,$event->getURL()); elgg_push_breadcrumb(elgg_echo('event_calendar:manage_event_title')); @@ -1547,6 +1550,7 @@ function event_calendar_get_page_content_edit($page_type,$guid) { $content = elgg_echo('event_calendar:no_group'); } } else { + $body_vars['group_guid'] = 0; elgg_push_breadcrumb(elgg_echo('event_calendar:show_events_title'),'event_calendar/list'); elgg_push_breadcrumb(elgg_echo('event_calendar:add_event_title')); -- cgit v1.2.3