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

This commit is contained in:
friendica 2015-02-02 14:59:01 -08:00
parent e58bef049d
commit 043ff33e43
2 changed files with 4 additions and 0 deletions

View File

@ -4751,6 +4751,7 @@ function item_remove_cid($xchan_hash,$mid,$uid) {
// Set item permissions based on results obtained from linkify_tags() // Set item permissions based on results obtained from linkify_tags()
function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, $profile_uid, $parent_item = false) { function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, $profile_uid, $parent_item = false) {
$first_access_tag = true; $first_access_tag = true;
foreach($linkified as $x) { foreach($linkified as $x) {
$access_tag = $x['access_tag']; $access_tag = $x['access_tag'];
if(($access_tag) && (! $parent_item)) { if(($access_tag) && (! $parent_item)) {

View File

@ -2297,6 +2297,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) {
} }
} }
else { else {
// check for a group/collection exclusion tag // check for a group/collection exclusion tag
// note that we aren't setting $replaced even though we're replacing text. // 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); $tags = get_tags($body);
if(count($tags)) { if(count($tags)) {
foreach($tags as $tag) { foreach($tags as $tag) {
$access_tag = '';
// If we already tagged 'Robert Johnson', don't try and tag 'Robert'. // If we already tagged 'Robert Johnson', don't try and tag 'Robert'.
// Robert Johnson should be first in the $tags array // Robert Johnson should be first in the $tags array