diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-06 11:23:11 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-06 11:23:11 +0000 |
commit | 68c36b6a64f924a7b89e0c53d20e30bee7178374 (patch) | |
tree | c4f0d9ebfeaa590e37e0d518543db9da75e0c580 /engine/lib/metadata.php | |
parent | be6d5f0455f1603ea08b92b6444721ea8869e4ac (diff) | |
download | elgg-68c36b6a64f924a7b89e0c53d20e30bee7178374.tar.gz elgg-68c36b6a64f924a7b89e0c53d20e30bee7178374.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Ability to change owner
git-svn-id: https://code.elgg.org/elgg/trunk@88 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r-- | engine/lib/metadata.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index e3a01ee2e..ed2d2f0d0 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -84,7 +84,7 @@ function save() { - if (isset($this->id)) + if ($this->id > 0) return update_metadata($this->id, $this->name, $this->value, $this->value_type, $this->owner_id, $this->access_id); else { @@ -151,7 +151,7 @@ $access = get_access_list(); - return update_data("UPDATE {$CONFIG->dbprefix}metadata set value='$value', value_type='$value_type', access_id=$access_id where id=$id and name='$name' and (access_id in {$access} or (access_id = 0 and owner_id = {$_SESSION['id']}))"); + return update_data("UPDATE {$CONFIG->dbprefix}metadata set value='$value', value_type='$value_type', access_id=$access_id, owner_id=$owner_id where id=$id and name='$name' and (access_id in {$access} or (access_id = 0 and owner_id = {$_SESSION['id']}))"); } /** |