diff options
Diffstat (limited to 'engine/lib/annotations.php')
-rw-r--r-- | engine/lib/annotations.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 3a950568f..3ff8c0e69 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -240,6 +240,11 @@ $time = time(); + // Add the metastring + $value = add_metastring($value); + if (!$value) return false; + + // If ok then add it return insert_data("INSERT into {$CONFIG->dbprefix}annotations (object_id, object_type, name, value, value_type, owner_id, created, access_id) VALUES ($object_id,'$object_type','$name','$value','$value_type', $owner_id, $time, $access_id)"); } @@ -269,6 +274,11 @@ $access = get_access_list(); + // Add the metastring + $value = add_metastring($value); + if (!$value) return false; + + // If ok then add it 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']}))"); } |