diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-12-23 19:26:08 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-12-23 19:26:08 -0500 |
commit | e3100d350c27804f80de3321b00be9dfc23c6d2a (patch) | |
tree | 09af43b81eee3c40456ce0d53ef5a4f62c25a00d /engine | |
parent | fe8c24ddf1275aff531d14184cfc35b631cad0ec (diff) | |
download | elgg-e3100d350c27804f80de3321b00be9dfc23c6d2a.tar.gz elgg-e3100d350c27804f80de3321b00be9dfc23c6d2a.tar.bz2 |
Fixes #682 not deleting metadata when update, metadata event handlers return false
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/metadata.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 050e69526..4908b3e88 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -216,12 +216,11 @@ function update_metadata($id, $name, $value, $value_type, $owner_guid, $access_i $result = update_data($query); if ($result !== false) { + // @todo this event tells you the metadata has been updated, but does not + // let you do anything about it. What is needed is a plugin hook before + // the update that passes old and new values. $obj = elgg_get_metadata_from_id($id); - if (elgg_trigger_event('update', 'metadata', $obj)) { - return true; - } else { - elgg_delete_metadata_by_id($id); - } + elgg_trigger_event('update', 'metadata', $obj); } return $result; |