aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-16 17:32:10 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-16 17:32:10 +0000
commit883ffca4fd31c2b7a88bc64799c25bc689caa779 (patch)
treeeb2465735e17c37be728efdc5fcdc7e59cb4880d
parenta210d385b0f7967aa4d1dabbd9d7c59168e8d796 (diff)
downloadelgg-883ffca4fd31c2b7a88bc64799c25bc689caa779.tar.gz
elgg-883ffca4fd31c2b7a88bc64799c25bc689caa779.tar.bz2
Closes #155: Introduces 'volatile' type of metadata in odd feeds.
git-svn-id: https://code.elgg.org/elgg/trunk@1444 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/entities.php15
-rw-r--r--engine/lib/extender.php1
2 files changed, 14 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 720597a83..30bd2d89b 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -602,11 +602,11 @@
case 'owner_guid' : // Convert owner guid to uuid, this will be stored in metadata
$k = 'owner_uuid';
$v = guid_to_uuid($v);
- $meta = new ODDMetadata($uuid . "attr/$k/", $uuid, $k, $v);
+ $meta = new ODDMetaData($uuid . "attr/$k/", $uuid, $k, $v);
break;
default :
- $meta = new ODDMetadata($uuid . "attr/$k/", $uuid, $k, $v);
+ $meta = new ODDMetaData($uuid . "attr/$k/", $uuid, $k, $v);
}
// set the time of any metadata created
@@ -617,6 +617,17 @@
}
}
+ // Now we do something a bit special.
+ /*
+ * This provides a rendered view of the entity to foreign sites.
+ */
+
+ elgg_set_viewtype('default');
+ $view = elgg_view_entity($this, 'default');
+ elgg_set_viewtype();
+
+ $tmp[] = new ODDMetaData($uuid . "volatile/renderedentity/", $uuid, 'renderedentity', $view , 'volatile');
+
return $tmp;
}
diff --git a/engine/lib/extender.php b/engine/lib/extender.php
index a996f33bf..b2482cd80 100644
--- a/engine/lib/extender.php
+++ b/engine/lib/extender.php
@@ -257,6 +257,7 @@
switch ($type)
{
+ case 'volatile' : break; // Ignore volatile items
case 'annotation' :
$entity->annotate($attr_name, $attr_val);
break;