From 3cc66b68162a82493cd68d369e4f0cbb01f941d0 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 20 Sep 2018 16:07:32 -0700 Subject: bookmarks fail to sync --- Zotlabs/Module/Bookmarks.php | 2 +- include/bookmarks.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Module/Bookmarks.php b/Zotlabs/Module/Bookmarks.php index cea0d9759..cee86a47d 100644 --- a/Zotlabs/Module/Bookmarks.php +++ b/Zotlabs/Module/Bookmarks.php @@ -59,7 +59,7 @@ class Bookmarks extends \Zotlabs\Web\Controller { killme(); } - function get() { + function get() { if(! local_channel()) { notice( t('Permission denied.') . EOL); return; diff --git a/include/bookmarks.php b/include/bookmarks.php index 0db103054..21456c871 100644 --- a/include/bookmarks.php +++ b/include/bookmarks.php @@ -59,9 +59,10 @@ function bookmark_add($channel,$sender,$taxonomy,$private,$opts = null) { ); if($r) logger('add_bookmark: duplicate menu entry', LOGGER_DEBUG); - if(! $r) + if(! $r) { $r = menu_add_item($menu_id,$channel_id,$iarr); - + menu_sync_packet($channel_id,get_observer_hash(),$menu_id); + } return $r; } -- cgit v1.2.3 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/Cal.php | 2 ++ Zotlabs/Module/Events.php | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Module/Cal.php b/Zotlabs/Module/Cal.php index 87c13ef4e..3809064b0 100644 --- a/Zotlabs/Module/Cal.php +++ b/Zotlabs/Module/Cal.php @@ -6,6 +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 Cal extends \Zotlabs\Web\Controller { @@ -293,6 +294,7 @@ class Cal 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'], 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/Cal.php | 2 +- Zotlabs/Module/Events.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Cal.php b/Zotlabs/Module/Cal.php index 3809064b0..14c109515 100644 --- a/Zotlabs/Module/Cal.php +++ b/Zotlabs/Module/Cal.php @@ -294,7 +294,7 @@ class Cal 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'], 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