diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-27 01:39:15 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-27 01:39:15 +0000 |
commit | 4bdf41ded072917782aa4b0183e3cc8c0e297389 (patch) | |
tree | 5e4f3069a818d2e12806e6a76bc10dec2c92eee9 /engine/lib/views.php | |
parent | 53062715e71e7ce4bf6310731dc1ec102fb87f1c (diff) | |
download | elgg-4bdf41ded072917782aa4b0183e3cc8c0e297389.tar.gz elgg-4bdf41ded072917782aa4b0183e3cc8c0e297389.tar.bz2 |
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
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r-- | engine/lib/views.php | 9 |
1 files changed, 6 insertions, 3 deletions
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); } /** |