aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2013-06-08 19:17:11 -0700
committerSteve Clay <steve@mrclay.org>2013-06-08 19:17:11 -0700
commitc3f02ab07e20b870cb36e05de2795ef9fea09182 (patch)
tree57c55519f4fa4bb3b4d6b87bf95f2fbf40130459 /engine/lib
parent666b214e94b80b713797710d04d06d3f11271ff0 (diff)
parent5a1a793f8634e0f7133644e09e9ace60782864d4 (diff)
downloadelgg-c3f02ab07e20b870cb36e05de2795ef9fea09182.tar.gz
elgg-c3f02ab07e20b870cb36e05de2795ef9fea09182.tar.bz2
Merge pull request #5619 from mrclay/5598
Fixes #5598: Properly update metadata cache in update_metadata()
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/metadata.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 43f7d5d6e..046b85124 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -191,19 +191,19 @@ function update_metadata($id, $name, $value, $value_type, $owner_guid, $access_i
}
// Add the metastring
- $value = add_metastring($value);
- if (!$value) {
+ $value_id = add_metastring($value);
+ if (!$value_id) {
return false;
}
- $name = add_metastring($name);
- if (!$name) {
+ $name_id = add_metastring($name);
+ if (!$name_id) {
return false;
}
// If ok then add it
$query = "UPDATE {$CONFIG->dbprefix}metadata"
- . " set name_id='$name', value_id='$value', value_type='$value_type', access_id=$access_id,"
+ . " set name_id='$name_id', value_id='$value_id', value_type='$value_type', access_id=$access_id,"
. " owner_guid=$owner_guid where id=$id";
$result = update_data($query);