aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 18:46:16 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 18:46:16 +0000
commit33924cdccbead44691dfac2caa3c882810b5003f (patch)
tree895d4c6af0bb6d37e3ec8141821c39e1e5d7d9c9
parent5919c4539e5602aaaeb82ed64373d0500dc4911f (diff)
downloadelgg-33924cdccbead44691dfac2caa3c882810b5003f.tar.gz
elgg-33924cdccbead44691dfac2caa3c882810b5003f.tar.bz2
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
-rw-r--r--engine/lib/metadata.php6
1 files 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) {