aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-09 17:42:16 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-09 17:42:16 +0000
commit1091d22f391a73fd080c387dfe5470124fcff616 (patch)
treee95862869b039255defa728d7b726f046ce5606c /engine
parenta6d083ac65701d82095a77b5c9d4a981cb23bdd8 (diff)
downloadelgg-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.php9
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.");
}
}