From 1ca017f9f9f8b44fbdcb08105a52e059df6bb504 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Wed, 19 Oct 2011 19:56:43 +0200 Subject: added proper check for group enabled calendar and renamed some deprecated functions --- start.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'start.php') diff --git a/start.php b/start.php index 24a100f9f..ed0ba41db 100644 --- a/start.php +++ b/start.php @@ -107,8 +107,9 @@ function event_calendar_init() { * Add a menu item to an ownerblock */ function event_calendar_owner_block_menu($hook, $type, $return, $params) { + elgg_load_library('elgg:event_calendar'); if (elgg_instanceof($params['entity'], 'group')) { - if ($params['entity']->event_calendar_enable != "no") { + if (event_calendar_activated_for_group($params['entity'])) { $url = "event_calendar/group/{$params['entity']->guid}"; $item = new ElggMenuItem('event_calendar', elgg_echo('event_calendar:group'), $url); $return[] = $item; -- cgit v1.2.3