use Friendica\Core\Logger;
use Friendica\Database\DBA;
use Friendica\DI;
+use Friendica\Model\Tag;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
$title = $b['title'];
$post = BBCode::convert($b['body']);
$post = XML::escape($post);
- $tags = dwpost_get_tags($b['tag']);
+ $tags = Tag::getCSVByURIId($b['uri-id'], [Tag::HASHTAG]);
$date = DateTimeFormat::convert($b['created'], $tz);
$year = intval(substr($date,0,4));
Logger::log('posted to dreamwidth: ' . ($x) ? $x : '', Logger::DEBUG);
}
}
-
-function dwpost_get_tags($post)
-{
- preg_match_all("/\]([^\[#]+)\[/", $post, $matches);
-
- $tags = implode(', ', $matches[1]);
-
- return $tags;
-}