]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
add button always appears, even for event polls, fixes issue #37
authorKevin Jardine <kevinjardine@yahoo.com>
Sun, 22 Jul 2012 11:08:19 +0000 (13:08 +0200)
committerKevin Jardine <kevinjardine@yahoo.com>
Sun, 22 Jul 2012 11:08:19 +0000 (13:08 +0200)
models/model.php

index 2752626bcad64165a859a7c6ffd7b0baa61ff591..8e82052ec98d8659ab82ed82d223de6fc94d19b6 100644 (file)
@@ -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',
+                       ));
                }
        }