[various] Remove references to obsolete virtual tag item.tag #981

Merged
MrPetovan merged 5 commits from task/remove-item-tag into develop 2020-05-14 06:13:47 +02:00
Showing only changes of commit b6cd18fcad - Show all commits

View file

@ -12,6 +12,7 @@ use Friendica\Content\Text\BBCode;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\DI;
use Friendica\Model\Tag;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
@ -188,7 +189,7 @@ function ljpost_send(&$a,&$b) {
$title = XML::escape($b['title']);
$post = BBCode::convert($b['body']);
$post = XML::escape($post);
$tags = ljpost_get_tags($b['tag']);
$tags = Tag::getCSVByURIId($b['uri-id'], [Tag::HASHTAG]);
$date = DateTimeFormat::convert($b['created'], $tz);
$year = intval(substr($date,0,4));
@ -245,10 +246,3 @@ EOT;
Logger::log('posted to livejournal: ' . ($x) ? $x : '', Logger::DEBUG);
}
}
function ljpost_get_tags($post)
{
preg_match_all("/\]([^\[#]+)\[/",$post,$matches);
$tags = implode(', ',$matches[1]);
return $tags;
}