aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-05 14:44:43 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-05 14:44:43 +0000
commit524c8e140c11f1917e6658f9bc56158691cedc0e (patch)
tree524fecb19d9c36309d0c865dc1218a65bd14b649
parentbbe328d136e55c3532d63205b5e09bf3741ac950 (diff)
downloadelgg-524c8e140c11f1917e6658f9bc56158691cedc0e.tar.gz
elgg-524c8e140c11f1917e6658f9bc56158691cedc0e.tar.bz2
Tagging issue on unsaved entities: solved.
git-svn-id: https://code.elgg.org/elgg/trunk@1708 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/entities.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 3c679f5cd..94f3e56e7 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -199,9 +199,9 @@
{
unset($this->temp_metadata[$name]);
remove_metadata($this->getGUID(), $name);
- $multiple = true;
foreach ($value as $v) {
- if ((int) $this->guid > 0) {
+ if ((int) $this->guid > 0) {
+ $multiple = true;
if (!create_metadata($this->getGUID(), $name, $v, $value_type, $this->getOwner(), $this->getAccessID(), $multiple)) return false;
} else {
if (($multiple) && (isset($this->temp_metadata[$name])))
@@ -223,7 +223,8 @@
return true;
}
else
- {
+ {
+ unset($this->temp_metadata[$name]);
if ((int) $this->guid > 0) {
return create_metadata($this->getGUID(), $name, $value, $value_type, $this->getOwner(), $this->getAccessID(), $multiple);
} else {