aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggEntity.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggEntity.php')
-rw-r--r--engine/classes/ElggEntity.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index ea2a329d9..4e1bc586c 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -292,9 +292,9 @@ abstract class ElggEntity extends ElggData implements
public function setMetaData($name, $value, $value_type = "", $multiple = false) {
if (is_array($value)) {
unset($this->temp_metadata[$name]);
- remove_metadata($this->getGUID(), $name);
foreach ($value as $v) {
if ((int) $this->guid > 0) {
+ elgg_delete_metadata(array('guid' => $this->guid, 'metadata_name' => $name));
$multiple = true;
if (!create_metadata($this->getGUID(), $name, $v, $value_type,
$this->getOwnerGUID(), $this->getAccessID(), $multiple)) {
@@ -349,7 +349,7 @@ abstract class ElggEntity extends ElggData implements
*
* @return mixed bool
*/
- public function clearMetaData($name = "") {
+ public function clearMetaData($name = '') {
if (empty($name)) {
return clear_metadata($this->getGUID());
} else {
@@ -357,7 +357,6 @@ abstract class ElggEntity extends ElggData implements
}
}
-
/**
* Get a piece of volatile (non-persisted) data on this entity.
*