use Friendica\Database\DBStructure;
use Friendica\DI;
use Friendica\Model\Item;
-use Friendica\Model\Term;
+use Friendica\Model\Tag;
use Friendica\Module\Security\Login;
use Friendica\Network\HTTPException;
use Friendica\Util\DateTimeFormat;
throw new HTTPException\NotFoundException(DI::l10n()->t('Unknown post with guid: %s', $args['guid']));
}
- $tags = Term::populateTagsFromItem($item);
+ $tags = Tag::populateTagsFromItem($item);
$item['tags'] = $tags['tags'];
$item['hashtags'] = $tags['hashtags'];
if ($handle && $password) {
Logger::log('diaspora_send: all values seem to be okay', Logger::DEBUG);
- $tag_arr = [];
- $tags = '';
- $x = preg_match_all('/\#\[(.*?)\](.*?)\[/',$b['tag'],$matches,PREG_SET_ORDER);
-
- if ($x) {
- foreach ($matches as $mtch) {
- $tag_arr[] = $mtch[2];
- }
- }
-
- if (count($tag_arr)) {
- $tags = implode(',',$tag_arr);
- }
-
$title = $b['title'];
$body = $b['body'];
// Insert a newline before and after a quote
$ltree_source .= " (".$b['app'].")";
if($ltree_url && $ltree_api_token && $ltree_blog && $ltree_source) {
- $tag_arr = [];
- $tags = '';
- $x = preg_match_all('/\#\[(.*?)\](.*?)\[/',$b['tag'],$matches,PREG_SET_ORDER);
-
- if($x) {
- foreach($matches as $mtch) {
- $tag_arr[] = $mtch[2];
- }
- }
- if(count($tag_arr))
- $tags = implode(',',$tag_arr);
-
$title = $b['title'];
$body = $b['body'];
// Insert a newline before and after a quote
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\DI;
+use Friendica\Model\Tag;
use Friendica\Util\Strings;
function tumblr_install()
$tmbl_blog = 'blog/' . $page . '/post';
if ($oauth_token && $oauth_token_secret && $tmbl_blog) {
+ $tags = Tag::getByURIId($b['uri-id']);
+
$tag_arr = [];
- $tags = '';
- preg_match_all('/\#\[(.*?)\](.*?)\[/', $b['tag'], $matches, PREG_SET_ORDER);
- if (!empty($matches)) {
- foreach($matches as $mtch) {
- $tag_arr[] = $mtch[2];
- }
+ foreach($tags as $tag) {
+ $tag_arr[] = $tag['name'];
}
if (count($tag_arr)) {