diff options
author | Kevin Jardine <kevinjardine@yahoo.com> | 2012-07-22 13:08:19 +0200 |
---|---|---|
committer | Kevin Jardine <kevinjardine@yahoo.com> | 2012-07-22 13:08:19 +0200 |
commit | 43df50de769ce11dac12ebedef07c7c1a7e9b7ab (patch) | |
tree | 83e938f969e6c42bfae77ed59b1baa1ad3f75459 | |
parent | 5c7dcf2a382479a4f9cf7eafeaa4eb30faed440d (diff) | |
download | elgg-43df50de769ce11dac12ebedef07c7c1a7e9b7ab.tar.gz elgg-43df50de769ce11dac12ebedef07c7c1a7e9b7ab.tar.bz2 |
add button always appears, even for event polls, fixes issue #37
-rw-r--r-- | models/model.php | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/models/model.php b/models/model.php index 2752626bc..8e82052ec 100644 --- a/models/model.php +++ b/models/model.php @@ -1483,27 +1483,23 @@ function event_calendar_get_page_content_list($page_type,$container_guid,$start_ $user_guid = elgg_get_logged_in_user_guid(); // TODO - ideally avoid the check on the event_poll plugin, perhaps by having event_poll remove the menu item if(event_calendar_can_add($container_guid)) { - if (!elgg_plugin_exists('event_poll')) { - elgg_register_menu_item('title', array( - 'name' => 'add', - 'href' => "event_calendar/add/".$container_guid, - 'text' => elgg_echo('event_calendar:add'), - 'class' => 'elgg-button elgg-button-action', - )); - } + elgg_register_menu_item('title', array( + 'name' => 'add', + 'href' => "event_calendar/add/".$container_guid, + 'text' => elgg_echo('event_calendar:add'), + 'class' => 'elgg-button elgg-button-action', + )); } } else { elgg_push_breadcrumb(elgg_echo('item:object:event_calendar')); $user_guid = elgg_get_logged_in_user_guid(); if(event_calendar_can_add($container_guid)) { - if (!elgg_plugin_exists('event_poll')) { - elgg_register_menu_item('title', array( - 'name' => 'add', - 'href' => "event_calendar/add", - 'text' => elgg_echo('event_calendar:add'), - 'class' => 'elgg-button elgg-button-action', - )); - } + elgg_register_menu_item('title', array( + 'name' => 'add', + 'href' => "event_calendar/add", + 'text' => elgg_echo('event_calendar:add'), + 'class' => 'elgg-button elgg-button-action', + )); } } |