]> git.mxchange.org Git - friendica.git/commitdiff
Remove remaining references to cirtual field item.tag
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 14 May 2020 02:35:13 +0000 (22:35 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 14 May 2020 02:35:13 +0000 (22:35 -0400)
mod/photos.php
src/Module/Debug/Babel.php

index 311d2b1c14e9639c1cdf7e9ed4fac9035d863f47..7a647e06b94ef64f2440fe14802b2496375c0bb4 100644 (file)
@@ -509,9 +509,9 @@ function photos_post(App $a)
 
                                                if ($profile) {
                                                        if (!empty($contact)) {
-                                                               $taginfo[] = [$newname, $profile, $notify, $contact, '@[url=' . str_replace(',', '%2c', $profile) . ']' . $newname . '[/url]'];
+                                                               $taginfo[] = [$newname, $profile, $notify, $contact];
                                                        } else {
-                                                               $taginfo[] = [$newname, $profile, $notify, null, '@[url=' . $profile . ']' . $newname . '[/url]'];
+                                                               $taginfo[] = [$newname, $profile, $notify, null];
                                                        }
 
                                                        $profile = str_replace(',', '%2c', $profile);
@@ -579,7 +579,6 @@ function photos_post(App $a)
                                        $arr['gravity']       = GRAVITY_PARENT;
                                        $arr['object-type']   = Activity\ObjectType::PERSON;
                                        $arr['target-type']   = Activity\ObjectType::IMAGE;
-                                       $arr['tag']           = $tagged[4];
                                        $arr['inform']        = $tagged[2];
                                        $arr['origin']        = 1;
                                        $arr['body']          = DI::l10n()->t('%1$s was tagged in %2$s by %3$s', '[url=' . $tagged[1] . ']' . $tagged[0] . '[/url]', '[url=' . DI::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo['resource-id'] . ']' . DI::l10n()->t('a photo') . '[/url]', '[url=' . $owner_record['url'] . ']' . $owner_record['name'] . '[/url]') ;
index 80c70f7888b8121e4a8c6cb02c2b02f45d932d7f..ecad73f4dcd82eee64b5bd39415b2883f9efbffc 100644 (file)
@@ -26,6 +26,7 @@ use Friendica\Content\Text;
 use Friendica\Core\Renderer;
 use Friendica\DI;
 use Friendica\Model\Item;
+use Friendica\Model\Tag;
 use Friendica\Util\XML;
 
 /**
@@ -101,10 +102,9 @@ class Babel extends BaseModule
                                                'content' => visible_whitespace($bbcode4)
                                        ];
 
-                                       $item = [
-                                               'body' => $bbcode,
-                                               'tag'  => '',
-                                       ];
+                                       $item = ['body' => $bbcode];
+
+                                       $tags = Text\BBCode::getTags($bbcode);
 
                                        Item::setHashtags($item);
                                        $results[] = [
@@ -113,7 +113,7 @@ class Babel extends BaseModule
                                        ];
                                        $results[] = [
                                                'title'   => DI::l10n()->t('Item Tags'),
-                                               'content' => $item['tag']
+                                               'content' => visible_whitespace(var_export($tags, true)),
                                        ];
                                        break;
                                case 'diaspora':