diff options
author | friendica <info@friendica.com> | 2013-01-19 22:21:00 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-19 22:21:00 -0800 |
commit | 45be26dd81a1679853763bc79c387bf0c6fdfe57 (patch) | |
tree | 306713eecc79b8bb40906454f5d01d8eb948eaf5 /include/event.php | |
parent | 994f322d471ff2271055db9344a31c7caef3c0db (diff) | |
download | volse-hubzilla-45be26dd81a1679853763bc79c387bf0c6fdfe57.tar.gz volse-hubzilla-45be26dd81a1679853763bc79c387bf0c6fdfe57.tar.bz2 volse-hubzilla-45be26dd81a1679853763bc79c387bf0c6fdfe57.zip |
more heavy lifting on API - though need to re-visit events and give them all message_ids from the origination site.
Diffstat (limited to 'include/event.php')
-rw-r--r-- | include/event.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/event.php b/include/event.php index 685842fc3..73a050cec 100644 --- a/include/event.php +++ b/include/event.php @@ -291,7 +291,7 @@ function event_store($arr) { $private = (($arr['allow_cid'] || $arr['allow_gid'] || $arr['deny_cid'] || $arr['deny_gid']) ? 1 : 0); - q("UPDATE item SET title = '%s', body = '%s', object = '%s', allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s', edited = '%s', item_flags = %d WHERE id = %d AND uid = %d LIMIT 1", + q("UPDATE item SET title = '%s', body = '%s', object = '%s', allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s', edited = '%s', item_flags = %d, item_private = %d WHERE id = %d AND uid = %d LIMIT 1", dbesc($arr['summary']), dbesc(format_event_bbcode($arr)), dbesc($object), @@ -300,7 +300,8 @@ function event_store($arr) { dbesc($arr['deny_cid']), dbesc($arr['deny_gid']), dbesc($arr['edited']), - intval(($private && ($r[0]['item_flags'] & ITEM_PRIVATE)) ? $r[0]['item_flags'] : $r[0]['item_flags'] ^ ITEM_PRIVATE), + intval($r[0]['item_flags']), + intval($private), intval($r[0]['id']), intval($arr['uid']) ); @@ -368,8 +369,6 @@ function event_store($arr) { $uri = item_message_id(); $private = (($arr['allow_cid'] || $arr['allow_gid'] || $arr['deny_cid'] || $arr['deny_gid']) ? 1 : 0); - if($private) - $item_flags |= ITEM_PRIVATE; $item_arr = array(); @@ -387,6 +386,7 @@ function event_store($arr) { $item_arr['allow_gid'] = $arr['allow_gid']; $item_arr['deny_cid'] = $arr['deny_cid']; $item_arr['deny_gid'] = $arr['deny_gid']; + $item_arr['private'] = (($arr['private'] || $private) ? 1 : 0); $item_arr['verb'] = ACTIVITY_POST; $item_arr['resource_type'] = 'event'; |