diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-22 11:09:20 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-22 11:09:20 +0000 |
commit | eb033fe18615fcc83d68de1c986bf828240e7cb0 (patch) | |
tree | 7ce86496b12c2f46b88d9f8453b530affeddf5ba | |
parent | 5758eaa9ae06edf8201907ef23e612ec1c02e66c (diff) | |
download | elgg-eb033fe18615fcc83d68de1c986bf828240e7cb0.tar.gz elgg-eb033fe18615fcc83d68de1c986bf828240e7cb0.tar.bz2 |
Saving cached annotations
git-svn-id: https://code.elgg.org/elgg/trunk@1487 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/entities.php | 10 |
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); |