From e482acd0c64200f2d94158c9fbe12537cad61a68 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 19 Jun 2008 10:24:15 +0000 Subject: Fixes #48: Elgg_view_river wrapper function http://trac.elgg.org/elgg/ticket/48 git-svn-id: https://code.elgg.org/elgg/trunk@988 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/river.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'engine') diff --git a/engine/lib/river.php b/engine/lib/river.php index 638f0e4cd..815ae9764 100644 --- a/engine/lib/river.php +++ b/engine/lib/river.php @@ -110,4 +110,29 @@ return $river; } + /** + * Simplify drawing a river for a given user. + * + * @param int $guid The user + * @param unknown_type $limit Limit + * @param unknown_type $offset Offset + * @param string $view Optional view to use to display the river (dashboard is assumed) + */ + function elgg_view_river($guid, $limit = 10, $offset = 0, $view = 'river/dashboard') + { + return elgg_view($view, array('river' => get_river_entries($guid,"", $limit, $offset))); + } + + /** + * Simplify drawing a river for a given user, showing their friend's activity + * + * @param int $guid The user + * @param unknown_type $limit Limit + * @param unknown_type $offset Offset + * @param string $view Optional view to use to display the river (dashboard is assumed) + */ + function elgg_view_friend_river($guid, $limit = 10, $offset = 0, $view = 'river/dashboard') + { + return elgg_view($view, array('river' => get_river_entries($guid,"", $limit, $offset))); + } ?> \ No newline at end of file -- cgit v1.2.3