Tagger is now storing the tag as well

This commit is contained in:
Michael 2020-04-17 13:36:55 +00:00
parent e365103ea3
commit 060503eb44

View File

@ -28,6 +28,7 @@ use Friendica\Core\Worker;
use Friendica\Database\DBA; use Friendica\Database\DBA;
use Friendica\DI; use Friendica\DI;
use Friendica\Model\Item; use Friendica\Model\Item;
use Friendica\Model\Tag;
use Friendica\Model\Term; use Friendica\Model\Term;
use Friendica\Protocol\Activity; use Friendica\Protocol\Activity;
use Friendica\Util\Strings; use Friendica\Util\Strings;
@ -171,6 +172,8 @@ EOT;
$term_objtype = ($item['resource-id'] ? Term::OBJECT_TYPE_PHOTO : Term::OBJECT_TYPE_POST); $term_objtype = ($item['resource-id'] ? Term::OBJECT_TYPE_PHOTO : Term::OBJECT_TYPE_POST);
Tag::store($item['uri-id'], Tag::HASHTAG, $term);
$t = q("SELECT count(tid) as tcount FROM term WHERE oid=%d AND term='%s'", $t = q("SELECT count(tid) as tcount FROM term WHERE oid=%d AND term='%s'",
intval($item['id']), intval($item['id']),
DBA::escape($term) DBA::escape($term)