From 043ff33e437451f6109e8d4cb5a2ce85cabcddec Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 2 Feb 2015 14:59:01 -0800 Subject: issue #889 private tags for forums no longer recognised after tag refactor a few weeks back. This solution is not optimal as it also leaves you in the privacy ACL in some cases and not in others but it restores the previous functionality --- include/text.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 13f3f2fdf..d19519779 100644 --- a/include/text.php +++ b/include/text.php @@ -2297,6 +2297,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) { } } else { + // check for a group/collection exclusion tag // note that we aren't setting $replaced even though we're replacing text. @@ -2357,6 +2358,8 @@ function linkify_tags($a, &$body, $uid) { $tags = get_tags($body); if(count($tags)) { foreach($tags as $tag) { + $access_tag = ''; + // If we already tagged 'Robert Johnson', don't try and tag 'Robert'. // Robert Johnson should be first in the $tags array -- cgit v1.2.3 From 3f50313862f5c2ca9d7118b234b2f154c7fb736a Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 3 Feb 2015 16:03:05 -0800 Subject: garbage in garbage out --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index d19519779..ef2fc2371 100644 --- a/include/text.php +++ b/include/text.php @@ -1946,9 +1946,9 @@ function find_xchan_in_array($xchan,$arr) { } function get_rel_link($j,$rel) { - if(count($j)) + if(is_array($j) && ($j)) foreach($j as $l) - if($l['rel'] === $rel) + if(array_key_exists('rel',$j) && $l['rel'] === $rel && array_key_exists('href',$l)) return $l['href']; return ''; -- cgit v1.2.3