From df4226866779f75eacab7f62da36b22dc21d5e44 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 22 Aug 2010 23:42:26 +0000 Subject: Merged r6812:6837 from 1.7 branch to trunk (skipping some changes to plugins like groups and wire) git-svn-id: http://code.elgg.org/elgg/trunk@6851 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engine/lib/entities.php') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 9b3895fd5..95807aab5 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1690,6 +1690,7 @@ function entity_row_to_elggstar($row) { return $new_entity; } + // load class for entity if one is registered $classname = get_subtype_class_from_id($row->subtype); if ($classname!="") { if (class_exists($classname)) { @@ -1702,7 +1703,8 @@ function entity_row_to_elggstar($row) { error_log(sprintf(elgg_echo('ClassNotFoundException:MissingClass'), $classname)); } } - else { + + if (!$new_entity) { switch ($row->type) { case 'object' : $new_entity = new ElggObject($row); -- cgit v1.2.3