From 6f02fe750275a8c3c01b2d010e69c6a08fd9c5c1 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 9 Jun 2008 14:25:12 +0000 Subject: Fixed class instanceof errors git-svn-id: https://code.elgg.org/elgg/trunk@833 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/river.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/river.php b/engine/lib/river.php index 32fa74516..10c8ac423 100644 --- a/engine/lib/river.php +++ b/engine/lib/river.php @@ -63,7 +63,8 @@ $object = $tmp->getObjectFromID($log->object_id); // Exists and we have access to it - if (is_a($object, $class)) + // if (is_a($object, $class)) + if ($object instanceof $class) { // If no relationship defined or it matches $relationship if ( @@ -77,9 +78,13 @@ // See if anything can handle it $tam = ""; - // test if view exist and if so + // test if view exist and if so + if (isset($by_user_obj) && $by_user_job instanceof ElggUser) { + } else { + $by_user_obj = get_entity($log->performed_by_guid); + } $tam = elgg_view("river/$class/$event", array( - 'performed_by' => ($by_user_obj instanceof ElggUser) ? $by_user_obj : get_entity($log->performed_by_guid), + 'performed_by' => $by_user_obj, 'log_entry' => $log, 'object' => $object )); -- cgit v1.2.3