aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-09 14:25:12 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-09 14:25:12 +0000
commit6f02fe750275a8c3c01b2d010e69c6a08fd9c5c1 (patch)
treea65a9b1a55488e5361c86e9d55fd52ae14ffa536
parent8d4e29a5c8b8caf7b18916a46d1aeed98cdff208 (diff)
downloadelgg-6f02fe750275a8c3c01b2d010e69c6a08fd9c5c1.tar.gz
elgg-6f02fe750275a8c3c01b2d010e69c6a08fd9c5c1.tar.bz2
Fixed class instanceof errors
git-svn-id: https://code.elgg.org/elgg/trunk@833 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/river.php11
1 files changed, 8 insertions, 3 deletions
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
));