From 0f97c0d4c48ed779c985d9ac4288db65c127234c Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 4 Mar 2009 18:09:31 +0000 Subject: Stopgap for when you can no longer view river items. git-svn-id: https://code.elgg.org/elgg/trunk@3082 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/river2.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'engine/lib/river2.php') diff --git a/engine/lib/river2.php b/engine/lib/river2.php index a08e29dc8..9d62d88f7 100644 --- a/engine/lib/river2.php +++ b/engine/lib/river2.php @@ -210,10 +210,15 @@ function elgg_view_river_item($item) { if (isset($item->view)) { - if (elgg_view_exists($item->view)) { - $body = elgg_view($item->view,array( - 'item' => $item - )); + $object = get_entity($item->object_guid); + if (!$object) { + $body = elgg_view('river/item/noaccess'); + } else { + if (elgg_view_exists($item->view)) { + $body = elgg_view($item->view,array( + 'item' => $item + )); + } } return elgg_view('river/item/wrapper',array( 'item' => $item, -- cgit v1.2.3