aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/entities.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 9072321a3..4682d27ba 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -487,7 +487,7 @@
$this->attributes['guid'] = create_entity($this->attributes['type'], $this->attributes['subtype'], $this->attributes['owner_guid'], $this->attributes['access_id'], $this->attributes['site_guid'], $this->attributes['container_guid']); // Create a new entity (nb: using attribute array directly 'cos set function does something special!)
if (!$this->attributes['guid']) throw new IOException(elgg_echo('IOException:BaseEntitySaveFailed'));
- // Save any unsaved metadata
+ // Save any unsaved metadata TODO: How to capture extra information (access id etc)
if (sizeof($this->temp_metadata) > 0) {
foreach($this->temp_metadata as $name => $value) {
$this->$name = $value;
@@ -495,6 +495,14 @@
}
}
+ // Save any unsaved annotations metadata. TODO: How to capture extra information (access id etc)
+ if (sizeof($this->temp_annotations) > 0) {
+ foreach($this->temp_annotations as $name => $value) {
+ $this->annotate($name, $value);
+ unset($this->temp_annotations[$name]);
+ }
+ }
+
// Cache object handle
if ($this->attributes['guid']) cache_entity($this);