diff options
-rw-r--r-- | Zotlabs/Daemon/Notifier.php | 14 | ||||
-rw-r--r-- | include/event.php | 22 |
2 files changed, 21 insertions, 15 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index d66079216..d3b0a6b14 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -672,15 +672,17 @@ class Notifier { $packet = zot_build_packet($channel,$packet_type,(($packet_recips) ? $packet_recips : null)); } } - if($packet_type === 'keychange' && $hub['hubloc_network'] === 'zot') { + if($packet_type === 'keychange' && $hub['hubloc_network'] === 'zot6') { $pmsg = get_pconfig($channel['channel_id'],'system','keychange'); - $packet = zot_build_packet($channel,$packet_type,(($packet_recips) ? $packet_recips : null)); + $packet = Libzot::build_packet($channel, $packet_type, (($packet_recips) ? $packet_recips : null)); + // $packet = zot_build_packet($channel,$packet_type,(($packet_recips) ? $packet_recips : null)); + } - elseif($packet_type === 'request' && $hub['hubloc_network'] === 'zot') { + elseif($packet_type === 'request' && $hub['hubloc_network'] === 'zot6') { $env = (($hub_env && $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']]) ? $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']] : ''); - $packet = zot_build_packet($channel,$packet_type,$env,$hub['hubloc_sitekey'],$hub['site_crypto'], - $hash, array('message_id' => $request_message_id) - ); + $packet = Libzot::build_packet($channel, $packet_type, $env, ['message_id' => $request_message_id], 'activitystreams', $hub['hubloc_sitekey'], $hub['site_crypto']); + // $packet = zot_build_packet($channel,$packet_type,$env,$hub['hubloc_sitekey'],$hub['site_crypto'],$hash, array('message_id' => $request_message_id)); + } if($packet) { diff --git a/include/event.php b/include/event.php index c9cbb7c94..6161175f6 100644 --- a/include/event.php +++ b/include/event.php @@ -422,6 +422,10 @@ function event_store_event($arr) { $arr['event_xchan'] = (($arr['event_xchan']) ? $arr['event_xchan'] : ''); $arr['event_priority'] = (($arr['event_priority']) ? $arr['event_priority'] : 0); + if (! $arr['dtend']) { + $arr['dtend'] = NULL_DATE; + $arr['nofinish'] = 1; + } if(array_key_exists('event_status_date',$arr)) $arr['event_status_date'] = datetime_convert('UTC','UTC', $arr['event_status_date']); @@ -507,9 +511,9 @@ function event_store_event($arr) { deny_gid = '%s' WHERE id = %d AND uid = %d", - dbesc($arr['edited']), - dbesc($arr['dtstart']), - dbesc($arr['dtend']), + dbesc(datetime_convert('UTC','UTC',$arr['edited'])), + dbesc(datetime_convert('UTC','UTC',$arr['dtstart'])), + dbesc(datetime_convert('UTC','UTC',$arr['dtend'])), dbesc($arr['summary']), dbesc($arr['description']), dbesc($arr['location']), @@ -517,7 +521,7 @@ function event_store_event($arr) { intval($arr['adjust']), intval($arr['nofinish']), dbesc($arr['event_status']), - dbesc($arr['event_status_date']), + dbesc(datetime_convert('UTC','UTC',$arr['event_status_date'])), intval($arr['event_percent']), dbesc($arr['event_repeat']), intval($arr['event_sequence']), @@ -553,10 +557,10 @@ function event_store_event($arr) { intval($arr['account']), dbesc($arr['event_xchan']), dbesc($hash), - dbesc($arr['created']), - dbesc($arr['edited']), - dbesc($arr['dtstart']), - dbesc($arr['dtend']), + dbesc(datetime_convert('UTC','UTC',$arr['created'])), + dbesc(datetime_convert('UTC','UTC',$arr['edited'])), + dbesc(datetime_convert('UTC','UTC',$arr['dtstart'])), + dbesc(datetime_convert('UTC','UTC',$arr['dtend'])), dbesc($arr['summary']), dbesc($arr['description']), dbesc($arr['location']), @@ -564,7 +568,7 @@ function event_store_event($arr) { intval($arr['adjust']), intval($arr['nofinish']), dbesc($arr['event_status']), - dbesc($arr['event_status_date']), + dbesc(datetime_convert('UTC','UTC',$arr['event_status_date'])), intval($arr['event_percent']), dbesc($arr['event_repeat']), intval($arr['event_sequence']), |