aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/event_calendar/content.php
diff options
context:
space:
mode:
authorMatt Beckett <beck24@gmail.com>2012-07-03 12:54:06 -0600
committerMatt Beckett <beck24@gmail.com>2012-07-03 12:54:06 -0600
commitbd6840a34cd9d3b3afabf3f6c977f8cea5a32662 (patch)
treec612203a30903b28069097a15ed0ee11e2dde373 /views/default/widgets/event_calendar/content.php
parent2d605dc207541121f02fda9893509acb8e605212 (diff)
downloadelgg-bd6840a34cd9d3b3afabf3f6c977f8cea5a32662.tar.gz
elgg-bd6840a34cd9d3b3afabf3f6c977f8cea5a32662.tar.bz2
removed old widget file
Allows calendar widget to be useful in groups context
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) {