aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/river.php25
1 files changed, 19 insertions, 6 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php
index 174b358ab..5a18fb34e 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -82,12 +82,25 @@
if (isset($by_user_obj) && $by_user_obj instanceof ElggUser) {
} else {
$by_user_obj = get_entity($log->performed_by_guid);
- }
- $tam = elgg_view("river/$class/$event", array(
- 'performed_by' => $by_user_obj,
- 'log_entry' => $log,
- 'object' => $object
- ));
+ }
+ if ($object instanceof ElggEntity) {
+ $subtype = $object->subtype;
+ } else {
+ $subtype = "";
+ }
+ if (!empty($subtype) && elgg_view_exists("river/{$subtype}/event")) {
+ $tam = elgg_view("river/{$subtype}/$event", array(
+ 'performed_by' => $by_user_obj,
+ 'log_entry' => $log,
+ 'object' => $object
+ ));
+ } else {
+ $tam = elgg_view("river/$class/$event", array(
+ 'performed_by' => $by_user_obj,
+ 'log_entry' => $log,
+ 'object' => $object
+ ));
+ }
if (!empty($tam)) {
$tam = elgg_view("river/wrapper",array(