diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-09 17:42:16 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-09 17:42:16 +0000 |
commit | 1091d22f391a73fd080c387dfe5470124fcff616 (patch) | |
tree | e95862869b039255defa728d7b726f046ce5606c /engine | |
parent | a6d083ac65701d82095a77b5c9d4a981cb23bdd8 (diff) | |
download | elgg-1091d22f391a73fd080c387dfe5470124fcff616.tar.gz elgg-1091d22f391a73fd080c387dfe5470124fcff616.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Will now return objects via metadata
git-svn-id: https://code.elgg.org/elgg/trunk@123 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/metadata.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 6fd95f61c..56bb83990 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -307,12 +307,13 @@ foreach ($results as $r) { + switch ($r->object_type) { - case 'object' : $objects[] = new ElggObject($r->object_id); break; - case 'user' : $objects[] = new ElggUser($r->object_id); break; - case 'collection' : $objects[] = new ElggCollection($r->object_id); break; - case 'site' : $objects[] = new ElggSite($r->object_id); break; + case 'object' : $objects[] = new ElggObject((int)$r->object_id); break; + case 'user' : $objects[] = new ElggUser((int)$r->object_id); break; + case 'collection' : $objects[] = new ElggCollection((int)$r->object_id); break; + case 'site' : $objects[] = new ElggSite((int)$r->object_id); break; default: default : throw new InstallationException("Type {$r->object_type} is not supported. This indicates an error in your installation, most likely caused by an incomplete upgrade."); } } |