aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/event_calendar/content.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-07-22 13:09:41 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2012-07-22 13:09:41 +0200
commitd4f4f93ff198915232d6ac575cc63e931dfcd0d8 (patch)
tree8ce8d094c28d66263afec9cd55a687bcf154261d /views/default/widgets/event_calendar/content.php
parent43df50de769ce11dac12ebedef07c7c1a7e9b7ab (diff)
parent86d154541f9cf1de74f79cae6c1b05b3214bdca8 (diff)
downloadelgg-d4f4f93ff198915232d6ac575cc63e931dfcd0d8.tar.gz
elgg-d4f4f93ff198915232d6ac575cc63e931dfcd0d8.tar.bz2
Merge branch 'full' of github.com:kevinjardine/Elgg-Event-Calendar into full
Diffstat (limited to 'views/default/widgets/event_calendar/content.php')
-rw-r--r--views/default/widgets/event_calendar/content.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/views/default/widgets/event_calendar/content.php b/views/default/widgets/event_calendar/content.php
index 329046cb0..eaedb76bd 100644
--- a/views/default/widgets/event_calendar/content.php
+++ b/views/default/widgets/event_calendar/content.php
@@ -20,8 +20,12 @@
$num = 5;
// Get the events
-
- $events = event_calendar_get_personal_events_for_user(elgg_get_page_owner_guid(),$num);
+ $owner = elgg_get_page_owner_entity();
+ if(elgg_instanceof($owner, 'group')) {
+ $events = event_calendar_get_events_for_group(elgg_get_page_owner_guid(),$num);
+ } else {
+ $events = event_calendar_get_personal_events_for_user(elgg_get_page_owner_guid(),$num);
+ }
// If there are any events to view, view them
if (is_array($events) && sizeof($events) > 0) {