From 4bdf41ded072917782aa4b0183e3cc8c0e297389 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 27 Mar 2011 01:39:15 +0000 Subject: Refs #3085 added $vars array to elgg_view_river_item() git-svn-id: http://code.elgg.org/elgg/trunk@8867 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/views.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engine') diff --git a/engine/lib/views.php b/engine/lib/views.php index 89d5c99b5..23ce738a1 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1173,13 +1173,14 @@ function elgg_view_module($type, $title, $body, $vars = array()) { } /** - * Returns a human-readable representation of a river item + * Renders a human-readable representation of a river item * * @param ElggRiverItem $item A river item object + * @param array $vars An array of variables for the view * * @return string|false Depending on success */ -function elgg_view_river_item($item) { +function elgg_view_river_item($item, array $vars = array()) { // checking default viewtype since some viewtypes do not have unique views per item (rss) if (!$item || !$item->getView() || !elgg_view_exists($item->getView(), 'default')) { return ''; @@ -1192,7 +1193,9 @@ function elgg_view_river_item($item) { return ''; } - return elgg_view('river/item', array('item' => $item)); + $vars['item'] = $item; + + return elgg_view('river/item', $vars); } /** -- cgit v1.2.3