From 58980819547175cd6c4ccd447bde84b8a83076a7 Mon Sep 17 00:00:00 2001 From: icewing Date: Thu, 6 Mar 2008 11:23:50 +0000 Subject: Marcus Povey * Ability to change owner git-svn-id: https://code.elgg.org/elgg/trunk@89 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/annotations.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index e73e04889..130cf12a2 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -84,7 +84,7 @@ function save() { - if (isset($this->id)) + if ($this->id > 0) return update_annotation($this->id, $this->name, $this->value, $this->value_type, $this->owner_id, $this->access_id); else { @@ -215,7 +215,7 @@ $access = get_access_list(); - return update_data("UPDATE {$CONFIG->dbprefix}annotations set value='$value', value_type='$value_type', access_id=$access_id where id=$annotation_id and name='$name' and (access_id in {$access} or (access_id = 0 and owner_id = {$_SESSION['id']}))"); + return update_data("UPDATE {$CONFIG->dbprefix}annotations set value='$value', value_type='$value_type', access_id=$access_id, owner_id=$owner_id where id=$annotation_id and name='$name' and (access_id in {$access} or (access_id = 0 and owner_id = {$_SESSION['id']}))"); } /** -- cgit v1.2.3