diff options
author | Mario <mario@mariovavti.com> | 2023-03-03 08:49:18 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-03-03 08:49:18 +0000 |
commit | ec3ba87f3a6cb9cda5f094bb1e62ed6b746f087f (patch) | |
tree | 2a5c739bf8c06297c64776a0f83374f17b288c56 /include/items.php | |
parent | da034045cc1bba74287b7c3e83f4a94ff5359150 (diff) | |
download | volse-hubzilla-ec3ba87f3a6cb9cda5f094bb1e62ed6b746f087f.tar.gz volse-hubzilla-ec3ba87f3a6cb9cda5f094bb1e62ed6b746f087f.tar.bz2 volse-hubzilla-ec3ba87f3a6cb9cda5f094bb1e62ed6b746f087f.zip |
Revert "some work on bringing bang tags back for forums"
This reverts commit da034045cc1bba74287b7c3e83f4a94ff5359150.
Diffstat (limited to 'include/items.php')
-rw-r--r-- | include/items.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php index d8f817fc2..b795df90d 100644 --- a/include/items.php +++ b/include/items.php @@ -2686,7 +2686,12 @@ function tag_deliver($uid, $item_id) { * Now we've got those out of the way. Let's see if this is a post that's tagged for re-delivery */ - $terms = isset($item['term']) ? get_terms_oftype($item['term'], [TERM_MENTION, TERM_FORUM]) : []; + $terms = []; + if (array_key_exists('term', $item)) { + $terms = array_merge(get_terms_oftype($item['term'],TERM_MENTION),get_terms_oftype($item['term'],TERM_FORUM)); + logger('Post mentions: ' . print_r($terms,true), LOGGER_DATA); + } + $max_forums = get_config('system','max_tagged_forums',2); $matched_forums = 0; @@ -2727,7 +2732,7 @@ function tag_deliver($uid, $item_id) { // standard forum tagging sequence !forumname - +/* $forumpattern = '/\!\!?\[[uz]rl\=([^\]]*?)\]((?:.(?!\[[uz]rl\=))*?)\[\/[uz]rl\]/'; $forumpattern2 = '/\[[uz]rl\=([^\]]*?)\]\!((?:.(?!\[[uz]rl\=))*?)\[\/[uz]rl\]/'; @@ -2761,6 +2766,8 @@ function tag_deliver($uid, $item_id) { } } +*/ + if(! ($tagged || $plustagged)) { logger('Mention was in a reshare or exceeded max_tagged_forums - ignoring'); continue; @@ -2986,6 +2993,7 @@ function tgroup_check($uid, $item) { $body = preg_replace('/\[share(.*?)\[\/share\]/','',$item['body']); +/* $forumpattern = '/\!\!?\[zrl\=([^\]]*?)\]((?:.(?!\[zrl\=))*?)\[\/zrl\]/'; $forumpattern2 = '/\[zrl\=([^\]]*?)\]\!((?:.(?!\[zrl\=))*?)\[\/zrl\]/'; @@ -3025,6 +3033,7 @@ function tgroup_check($uid, $item) { logger('tgroup_check: mention was in a reshare or exceeded max_tagged_forums - ignoring'); continue; } +*/ return true; } |