From cb2d706fa1118cf2bd55009f99186d65dfee5a2d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 19 Apr 2019 19:06:01 +0200 Subject: provide location and description information --- Zotlabs/Module/Channel_calendar.php | 16 +++++++++++----- Zotlabs/Module/Editpost.php | 3 ++- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Channel_calendar.php b/Zotlabs/Module/Channel_calendar.php index 7518a4d9b..6aada575a 100644 --- a/Zotlabs/Module/Channel_calendar.php +++ b/Zotlabs/Module/Channel_calendar.php @@ -39,7 +39,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller { $start_text = escape_tags($_REQUEST['dtstart']); $finish_text = escape_tags($_REQUEST['dtend']); - + $adjust = intval($_POST['adjust']); $nofinish = intval($_POST['nofinish']); @@ -60,8 +60,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller { else { $start = sprintf('%d-%d-%d %d:%d:0',$startyear,$startmonth,$startday,$starthour,$startminute); } - - + if($finish_text) { $finish = $finish_text; } @@ -74,6 +73,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller { } + if($adjust) { $start = datetime_convert($tz,'UTC',$start); if(! $nofinish) @@ -84,18 +84,20 @@ class Channel_calendar extends \Zotlabs\Web\Controller { if(! $nofinish) $finish = datetime_convert('UTC','UTC',$finish); } + + // Don't allow the event to finish before it begins. // It won't hurt anything, but somebody will file a bug report // and we'll waste a bunch of time responding to it. Time that // could've been spent doing something else. - + $summary = escape_tags(trim($_POST['summary'])); $desc = escape_tags(trim($_POST['desc'])); $location = escape_tags(trim($_POST['location'])); $type = escape_tags(trim($_POST['type'])); - + require_once('include/text.php'); linkify_tags($desc, local_channel()); linkify_tags($location, local_channel()); @@ -558,11 +560,15 @@ class Channel_calendar extends \Zotlabs\Web\Controller { 'j' => $j, 'd' => $d, 'is_editable' => $edit ? true : false, + 'is_first'=>$is_first, 'item'=>$rr, 'html'=>$html, 'plink' => array($rr['plink'],t('Link to Source'),'',''), + 'description' => $rr['description'], + 'location' => $rr['location'], + 'allow_cid' => expand_acl($rr['allow_cid']), 'allow_gid' => expand_acl($rr['allow_gid']), 'deny_cid' => expand_acl($rr['deny_cid']), diff --git a/Zotlabs/Module/Editpost.php b/Zotlabs/Module/Editpost.php index 1c9068e07..85882bf0a 100644 --- a/Zotlabs/Module/Editpost.php +++ b/Zotlabs/Module/Editpost.php @@ -45,7 +45,8 @@ class Editpost extends \Zotlabs\Web\Controller { } if($itm[0]['resource_type'] === 'event' && $itm[0]['resource_id']) { - goaway(z_root() . '/events/' . $itm[0]['resource_id'] . '?expandform=1'); + goaway(z_root() . '/cdav/calendar'); + //goaway(z_root() . '/events/' . $itm[0]['resource_id'] . '?expandform=1'); } $owner_uid = $itm[0]['uid']; -- cgit v1.2.3