From 33924cdccbead44691dfac2caa3c882810b5003f Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 26 Mar 2011 18:46:16 +0000 Subject: Refs #3238 fix for updating name of metadata for trunk git-svn-id: http://code.elgg.org/elgg/trunk@8850 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/metadata.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index f1bd69895..a6b1bb43a 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -146,7 +146,7 @@ function create_metadata($entity_guid, $name, $value, $value_type = '', $owner_g /** * Update a specific piece of metadata. * - * @param int $id Metadata id + * @param int $id ID of the metadata to update * @param string $name Metadata name * @param string $value Metadata value * @param string $value_type Value type @@ -210,8 +210,8 @@ function update_metadata($id, $name, $value, $value_type, $owner_guid, $access_i // If ok then add it $query = "UPDATE {$CONFIG->dbprefix}metadata" - . " set value_id='$value', value_type='$value_type', access_id=$access_id," - . " owner_guid=$owner_guid where id=$id and name_id='$name'"; + . " set name_id='$name', value_id='$value', value_type='$value_type', access_id=$access_id," + . " owner_guid=$owner_guid where id=$id"; $result = update_data($query); if ($result !== false) { -- cgit v1.2.3