aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/river_widget/content.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-19 18:37:25 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-19 18:37:25 +0000
commit199b22e79c6c9f6673fc2c65c28fcc2a2078fab3 (patch)
tree8aabdbffacdce34543f3825341a455edf4b9272d /views/default/widgets/river_widget/content.php
parent9025749d491f72f706844e2a86da63ce284b9ff6 (diff)
downloadelgg-199b22e79c6c9f6673fc2c65c28fcc2a2078fab3.tar.gz
elgg-199b22e79c6c9f6673fc2c65c28fcc2a2078fab3.tar.bz2
Fixes #3171 added river widget using same name as 1.7 riverdashboard plugin
git-svn-id: http://code.elgg.org/elgg/trunk@8774 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/widgets/river_widget/content.php')
-rw-r--r--views/default/widgets/river_widget/content.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/views/default/widgets/river_widget/content.php b/views/default/widgets/river_widget/content.php
new file mode 100644
index 000000000..427fd92bf
--- /dev/null
+++ b/views/default/widgets/river_widget/content.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Activity widget content view
+ */
+
+$num = (int) $vars['entity']->num_display;
+
+$options = array(
+ 'limit' => $num,
+ 'pagination' => false,
+);
+
+if (elgg_in_context('profile')) {
+ $options['subject_guid'] = elgg_get_page_owner_guid();
+} else {
+ if ($vars['entity']->content_type == 'friends') {
+ $options['relationship_guid'] = elgg_get_logged_in_user_guid();
+ $options['relationship'] = 'friend';
+ }
+}
+
+$content = elgg_list_river($options);
+if (!$content) {
+ $content = elgg_echo('river:none');
+}
+
+echo $content;