diff options
author | Max Kostikov <max@kostikov.co> | 2019-05-02 11:33:07 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-05-02 11:33:07 +0200 |
commit | 47fba5827bd106f53625b543f30643ca5ba1c16e (patch) | |
tree | bef05781eacc6dbc67d03899e0dde0257ce58096 /include/event.php | |
parent | 47f75ad8bfbe8325a76ae6fe466aa8080fc87045 (diff) | |
parent | 516167c0f8579c8a068b6e52557e7e1109f897ae (diff) | |
download | volse-hubzilla-47fba5827bd106f53625b543f30643ca5ba1c16e.tar.gz volse-hubzilla-47fba5827bd106f53625b543f30643ca5ba1c16e.tar.bz2 volse-hubzilla-47fba5827bd106f53625b543f30643ca5ba1c16e.zip |
Merge branch 'dev' into 'dev'
# Conflicts:
# Zotlabs/Lib/ThreadItem.php
Diffstat (limited to 'include/event.php')
-rw-r--r-- | include/event.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/event.php b/include/event.php index fdb9e1415..01122abed 100644 --- a/include/event.php +++ b/include/event.php @@ -4,8 +4,11 @@ * @brief Event related functions. */ + use Sabre\VObject; +use Zotlabs\Lib\Activity; + use Ramsey\Uuid\Uuid; use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; @@ -65,7 +68,7 @@ function format_event_html($ev) { } function format_event_obj($jobject) { - $event = array(); + $event = []; $object = json_decode($jobject,true); @@ -1046,6 +1049,7 @@ function event_store_item($arr, $event) { 'location' => $arr['location'], 'adjust' => $arr['adjust'], 'content' => format_event_bbcode($arr), + 'attachment' => Activity::encode_attachment($r[0]), 'author' => array( 'name' => $r[0]['xchan_name'], 'address' => $r[0]['xchan_addr'], @@ -1181,7 +1185,7 @@ function event_store_item($arr, $event) { // otherwise we'll fallback to /display/$message_id if($wall) - $item_arr['plink'] = z_root() . '/channel/' . $z[0]['channel_address'] . '/?f=&mid=' . urlencode($item_arr['mid']); + $item_arr['plink'] = z_root() . '/channel/' . $z[0]['channel_address'] . '/?f=&mid=' . gen_link_id($item_arr['mid']); else $item_arr['plink'] = z_root() . '/display/' . gen_link_id($item_arr['mid']); @@ -1200,6 +1204,7 @@ function event_store_item($arr, $event) { 'location' => $arr['location'], 'adjust' => $arr['adjust'], 'content' => format_event_bbcode($arr), + 'attachment' => Activity::encode_attachment($item_arr), 'author' => array( 'name' => $x[0]['xchan_name'], 'address' => $x[0]['xchan_addr'], @@ -1279,6 +1284,10 @@ function cdav_principal($uri) { } function cdav_perms($needle, $haystack, $check_rw = false) { + + if($needle == 'channel_calendar') + return true; + foreach ($haystack as $item) { if($check_rw) { if(is_array($item['id'])) { |