diff options
-rw-r--r-- | engine/lib/river2.php | 13 | ||||
-rw-r--r-- | languages/en.php | 1 | ||||
-rw-r--r-- | views/default/river/item/noaccess.php | 5 |
3 files changed, 15 insertions, 4 deletions
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,
diff --git a/languages/en.php b/languages/en.php index 5001800fe..b23872f73 100644 --- a/languages/en.php +++ b/languages/en.php @@ -376,6 +376,7 @@ To remove a widget drag it back to the <b>Widget gallery</b>.", */
'river' => "River",
'river:relationship:friend' => 'is now friends with',
+ 'river:noaccess' => 'You do not have permission to view this item.',
/**
* Plugins
diff --git a/views/default/river/item/noaccess.php b/views/default/river/item/noaccess.php new file mode 100644 index 000000000..47c177ea4 --- /dev/null +++ b/views/default/river/item/noaccess.php @@ -0,0 +1,5 @@ +<?php
+
+ echo elgg_echo('river:noaccess');
+
+?>
\ No newline at end of file |