From 5525f082e64bb942f8aae97d4976ea1ec0aa91ec Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 20 Sep 2018 22:43:01 -0700 Subject: remove bbcode from event hovertip --- Zotlabs/Module/Events.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module/Events.php') diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php index 33c8b8249..2115edde5 100644 --- a/Zotlabs/Module/Events.php +++ b/Zotlabs/Module/Events.php @@ -6,7 +6,7 @@ require_once('include/bbcode.php'); require_once('include/datetime.php'); require_once('include/event.php'); require_once('include/items.php'); - +require_once('include/html2plain.php'); class Events extends \Zotlabs\Web\Controller { @@ -641,6 +641,7 @@ class Events extends \Zotlabs\Web\Controller { } $html = format_event_html($rr); $rr['desc'] = zidify_links(smilies(bbcode($rr['desc']))); + $rr['description'] = htmlentities(html2plain(bbcode($rr['description'])),ENT_COMPAT,'UTF-8'); $rr['location'] = zidify_links(smilies(bbcode($rr['location']))); $events[] = array( 'id'=>$rr['id'], @@ -659,8 +660,6 @@ class Events extends \Zotlabs\Web\Controller { 'html'=>$html, 'plink' => array($rr['plink'],t('Link to Source'),'',''), ); - - } } -- cgit v1.2.3 From ba49e6a5889ffbb91ce783a00334d2b6221c42b7 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 20 Sep 2018 22:46:47 -0700 Subject: don't double encode --- Zotlabs/Module/Events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Events.php') diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php index 2115edde5..213fa6bff 100644 --- a/Zotlabs/Module/Events.php +++ b/Zotlabs/Module/Events.php @@ -641,7 +641,7 @@ class Events extends \Zotlabs\Web\Controller { } $html = format_event_html($rr); $rr['desc'] = zidify_links(smilies(bbcode($rr['desc']))); - $rr['description'] = htmlentities(html2plain(bbcode($rr['description'])),ENT_COMPAT,'UTF-8'); + $rr['description'] = htmlentities(html2plain(bbcode($rr['description'])),ENT_COMPAT,'UTF-8',false); $rr['location'] = zidify_links(smilies(bbcode($rr['location']))); $events[] = array( 'id'=>$rr['id'], -- cgit v1.2.3 From 781fdaafcd6a8086b76409b0a39d8edbca2e04c9 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 23 Sep 2018 19:18:05 +0200 Subject: settings for events and cdav calendar --- Zotlabs/Module/Events.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module/Events.php') diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php index 213fa6bff..b63921ce3 100644 --- a/Zotlabs/Module/Events.php +++ b/Zotlabs/Module/Events.php @@ -271,8 +271,10 @@ class Events extends \Zotlabs\Web\Controller { notice( t('Permission denied.') . EOL); return; } - + + \App::$profile_uid = local_channel(); nav_set_selected('Events'); + if((argc() > 2) && (argv(1) === 'ignore') && intval(argv(2))) { $r = q("update event set dismissed = 1 where id = %d and uid = %d", @@ -288,7 +290,7 @@ class Events extends \Zotlabs\Web\Controller { ); } - $first_day = get_pconfig(local_channel(),'system','cal_first_day'); + $first_day = feature_enabled(local_channel(), 'cal_first_day'); $first_day = (($first_day) ? $first_day : 0); $htpl = get_markup_template('event_head.tpl'); -- cgit v1.2.3 From a1d1d5dba7c975e00bcf8c8dfc8e6ccd13f3df90 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 23 Sep 2018 19:40:52 +0200 Subject: use different settings for cal_first_day in events and cdav/calendar. This is a tradeoff. It would be better to have one setting for both but if we want to preserve the *all settings* view, this would break its functionality --- Zotlabs/Module/Events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Events.php') diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php index b63921ce3..7e5204e62 100644 --- a/Zotlabs/Module/Events.php +++ b/Zotlabs/Module/Events.php @@ -290,7 +290,7 @@ class Events extends \Zotlabs\Web\Controller { ); } - $first_day = feature_enabled(local_channel(), 'cal_first_day'); + $first_day = feature_enabled(local_channel(), 'events_cal_first_day'); $first_day = (($first_day) ? $first_day : 0); $htpl = get_markup_template('event_head.tpl'); -- cgit v1.2.3