diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-24 10:44:46 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-24 10:44:46 +0000 |
commit | f84af9231b1038f56c98a6f0bf7fb7a5fa2f042e (patch) | |
tree | 8950eb5fc7e6d66ee7c45cdbfd923315bcc7ebb6 | |
parent | ecbb7357f3cedc48ce02d1074287c56d4e8ccd5a (diff) | |
download | elgg-f84af9231b1038f56c98a6f0bf7fb7a5fa2f042e.tar.gz elgg-f84af9231b1038f56c98a6f0bf7fb7a5fa2f042e.tar.bz2 |
River views now run off subtypes
git-svn-id: https://code.elgg.org/elgg/trunk@1091 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/river.php | 25 |
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(
|