aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2011-11-08 12:47:41 +0100
committerKevin Jardine <kevinjardine@yahoo.com>2011-11-08 12:47:41 +0100
commit1520b0b67e7ec0129f40e8795eb7ffde4e7c2aac (patch)
treea30530d279220af11b8c47f0d1f8e1654f2dee97 /start.php
parentdb951f94b6ae60f899f719f17dce4aa6c47edf54 (diff)
downloadelgg-1520b0b67e7ec0129f40e8795eb7ffde4e7c2aac.tar.gz
elgg-1520b0b67e7ec0129f40e8795eb7ffde4e7c2aac.tar.bz2
iCalendar fixes.
Diffstat (limited to 'start.php')
-rw-r--r--start.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/start.php b/start.php
index ed0ba41db..03f1a183a 100644
--- a/start.php
+++ b/start.php
@@ -337,11 +337,13 @@ function event_calendar_entity_menu_setup($hook, $type, $return, $params) {
function event_calendar_entity_menu_prepare($hook, $type, $return, $params) {
// remove access level from listings
- if (!elgg_in_context('event_calendar:view')) {
+ if (elgg_in_context('event_calendar') && !elgg_in_context('event_calendar:view')) {
$new_return = array();
- foreach($return['default'] AS $item) {
- if ($item->getName() != 'access') {
- $new_return[] = $item;
+ if ($return['default']) {
+ foreach($return['default'] AS $item) {
+ if ($item->getName() != 'access') {
+ $new_return[] = $item;
+ }
}
}
$return['default'] = $new_return;