From 0615709a7ab7bba66b2a07d593e84a35ed083edb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 15 Apr 2019 20:51:57 -0700 Subject: add attachments to zot6 event objects, add zot6 to federated transports (webfinger) --- include/event.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/event.php') diff --git a/include/event.php b/include/event.php index fdb9e1415..77118c329 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'], @@ -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'], -- cgit v1.2.3 From 9b6e46dc6b245a229b0b5af0efea88c2838ce56a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 19 Apr 2019 15:32:56 +0200 Subject: calendar merge initial commit --- include/event.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/event.php') diff --git a/include/event.php b/include/event.php index fdb9e1415..750d1add1 100644 --- a/include/event.php +++ b/include/event.php @@ -1279,6 +1279,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'])) { -- cgit v1.2.3 From 6672299f8ac973e92950f2134d5f7a5ec81825f3 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 2 May 2019 10:11:08 +0200 Subject: calendar merge: use b64 encoded mid for plink --- include/event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/event.php') diff --git a/include/event.php b/include/event.php index cfca00a3c..01122abed 100644 --- a/include/event.php +++ b/include/event.php @@ -1185,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']); -- cgit v1.2.3