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 /Zotlabs | |
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 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 13 | ||||
-rw-r--r-- | Zotlabs/Module/Acl.php | 12 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 1 |
3 files changed, 7 insertions, 19 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 60284c56d..dc868c93e 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -570,12 +570,7 @@ class Activity { break; case 'Mention': - $mention_type = substr($t['name'], 0, 1); - if ($mention_type === '!') { - $ret[] = ['ttype' => TERM_FORUM, 'url' => $t['href'], 'term' => escape_tags(substr($t['name'], 1))]; - } else { - $ret[] = ['ttype' => TERM_MENTION, 'url' => $t['href'], 'term' => escape_tags((substr($t['name'], 0, 1) === '@') ? substr($t['name'], 1) : $t['name'])]; - } + $ret[] = ['ttype' => TERM_MENTION, 'url' => $t['href'], 'term' => escape_tags((substr($t['name'], 0, 1) === '@') ? substr($t['name'], 1) : $t['name'])]; break; case 'Bookmark': @@ -610,10 +605,6 @@ class Activity { $ret[] = ['type' => 'Mention', 'href' => $t['url'], 'name' => '@' . $t['term']]; break; - case TERM_FORUM: - $ret[] = ['type' => 'Mention', 'href' => $t['url'], 'name' => '!' . $t['term']]; - break; - case TERM_BOOKMARK: $ret[] = ['type' => 'Bookmark', 'href' => $t['url'], 'name' => $t['term']]; break; @@ -945,7 +936,7 @@ class Activity { if (!$t['url']) { continue; } - if (in_array($t['ttype'], [TERM_MENTION, TERM_FORUM])) { + if ($t['ttype'] == TERM_MENTION) { $url = self::lookup_term_url($t['url']); $list[] = (($url) ? $url : $t['url']); } diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php index e7a1e6706..b98f5621e 100644 --- a/Zotlabs/Module/Acl.php +++ b/Zotlabs/Module/Acl.php @@ -69,7 +69,6 @@ class Acl extends \Zotlabs\Web\Controller { $sql_extra = ''; $sql_extra2 = ''; $sql_extra3 = ''; - $sql_extra4 = (($type === 'f') ? ' AND xchan_pubforum = 1 ' : ''); $sql_extra2_xchan = ''; $order_extra2 = ''; @@ -220,7 +219,7 @@ class Acl extends \Zotlabs\Web\Controller { $r = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_network as net, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, abook_their_perms, xchan_pubforum, abook_flags, abook_self FROM abook left join xchan on abook_xchan = xchan_hash - WHERE (abook_channel = %d $extra_channels_sql) AND abook_blocked = 0 and abook_pending = 0 and xchan_deleted = 0 $sql_extra2 $sql_extra4 order by $order_extra2 xchan_name asc" , + WHERE (abook_channel = %d $extra_channels_sql) AND abook_blocked = 0 and abook_pending = 0 and xchan_deleted = 0 $sql_extra2 order by $order_extra2 xchan_name asc" , intval(local_channel()) ); @@ -338,7 +337,6 @@ class Acl extends \Zotlabs\Web\Controller { else $r = array(); - if($r) { $i = count($contacts); $x = []; @@ -369,12 +367,10 @@ class Acl extends \Zotlabs\Web\Controller { "nick" => substr($g['nick'],0,strpos($g['nick'],'@')), "self" => (intval($g['abook_self']) ? 'abook-self' : ''), "taggable" => 'taggable', - "label" => t('network'), - "net" => $g['net'] ?? '' - + "label" => t('network') ); } - //if($type !== 'f') { + if($type !== 'f') { if (! array_key_exists($x[$lkey], $contacts) || ($contacts[$x[$lkey]]['net'] !== 'zot6' && $g['net'] == 'zot6')) { $contacts[$x[$lkey]] = array( "type" => "c", @@ -391,7 +387,7 @@ class Acl extends \Zotlabs\Web\Controller { "net" => $g['net'] ?? '' ); } - //} + } $i++; } } diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 0643cc447..27fc62ee6 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -840,6 +840,7 @@ class Item extends Controller { // Look for tags and linkify them $results = linkify_tags($body, ($uid) ? $uid : $profile_uid); + if ($results) { // Set permissions based on tag replacements |