diff options
-rw-r--r-- | engine/lib/river.php | 28 | ||||
-rw-r--r-- | engine/lib/views.php | 28 |
2 files changed, 28 insertions, 28 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php index 50f0c9ac0..f098c0c9e 100644 --- a/engine/lib/river.php +++ b/engine/lib/river.php @@ -461,34 +461,6 @@ function elgg_river_get_action_where_sql($types) { } /** - * Returns a human-readable representation of a river item - * - * @param ElggRiverItem $item A river item object - * - * @return string|false Depending on success - */ -function elgg_view_river_item($item) { - if (!$item || !$item->getView() || !elgg_view_exists($item->getView())) { - return ''; - } - - $subject = $item->getSubjectEntity(); - $object = $item->getObjectEntity(); - if (!$subject || !$object) { - // subject is disabled or subject/object deleted - return ''; - } - - $vars = array( - 'image' => elgg_view('core/river/image', array('item' => $item)), - 'body' => elgg_view('core/river/body', array('item' => $item)), - 'image_alt' => elgg_view('core/river/controls', array('item' => $item)), - 'class' => 'elgg-river-item', - ); - return elgg_view('layout/objects/image_block', $vars); -} - -/** * Sets the access ID on river items for a particular object * * @param int $object_guid The GUID of the entity diff --git a/engine/lib/views.php b/engine/lib/views.php index 396eb7c12..eff5df394 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1057,6 +1057,34 @@ function elgg_view_image_block($image, $body, $vars = array()) { } /** + * Returns a human-readable representation of a river item + * + * @param ElggRiverItem $item A river item object + * + * @return string|false Depending on success + */ +function elgg_view_river_item($item) { + if (!$item || !$item->getView() || !elgg_view_exists($item->getView())) { + return ''; + } + + $subject = $item->getSubjectEntity(); + $object = $item->getObjectEntity(); + if (!$subject || !$object) { + // subject is disabled or subject/object deleted + return ''; + } + + $vars = array( + 'image' => elgg_view('core/river/image', array('item' => $item)), + 'body' => elgg_view('core/river/body', array('item' => $item)), + 'image_alt' => elgg_view('core/river/controls', array('item' => $item)), + 'class' => 'elgg-river-item', + ); + return elgg_view('layout/objects/image_block', $vars); +} + +/** * Wrapper function to display search listings. * * @param string $icon The icon for the listing |