Term constants updated
This commit is contained in:
parent
552fd98657
commit
661dd43b0d
14 changed files with 31 additions and 51 deletions
|
@ -793,7 +793,7 @@ function networkThreadedView(App $a, $update, $parent)
|
|||
STRAIGHT_JOIN `contact` AS `author` ON `author`.`id` = `item`.`author-id`
|
||||
WHERE `item`.`uid` = 0 AND `item`.$ordering < ? AND `item`.$ordering > ? AND `item`.`gravity` = ?
|
||||
AND NOT `author`.`hidden` AND NOT `author`.`blocked`" . $sql_tag_nets,
|
||||
local_user(), TERM_OBJ_POST, TERM_HASHTAG,
|
||||
local_user(), Term::OBJECT_TYPE_POST, Term::HASHTAG,
|
||||
$top_limit, $bottom_limit, GRAVITY_PARENT);
|
||||
|
||||
$data = DBA::toArray($items);
|
||||
|
|
|
@ -28,6 +28,7 @@ use Friendica\Core\Worker;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Term;
|
||||
use Friendica\Protocol\Activity;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\XML;
|
||||
|
@ -168,7 +169,7 @@ EOT;
|
|||
Item::update(['visible' => true], ['id' => $item['id']]);
|
||||
}
|
||||
|
||||
$term_objtype = ($item['resource-id'] ? TERM_OBJ_PHOTO : TERM_OBJ_POST);
|
||||
$term_objtype = ($item['resource-id'] ? Term::OBJECT_TYPE_PHOTO : Term::OBJECT_TYPE_POST);
|
||||
|
||||
$t = q("SELECT count(tid) as tcount FROM term WHERE oid=%d AND term='%s'",
|
||||
intval($item['id']),
|
||||
|
@ -179,7 +180,7 @@ EOT;
|
|||
q("INSERT INTO term (oid, otype, type, term, url, uid) VALUE (%d, %d, %d, '%s', '%s', %d)",
|
||||
intval($item['id']),
|
||||
$term_objtype,
|
||||
TERM_HASHTAG,
|
||||
Term::HASHTAG,
|
||||
DBA::escape($term),
|
||||
'',
|
||||
intval($owner_uid)
|
||||
|
@ -201,7 +202,7 @@ EOT;
|
|||
q("INSERT INTO term (`oid`, `otype`, `type`, `term`, `url`, `uid`) VALUE (%d, %d, %d, '%s', '%s', %d)",
|
||||
intval($original_item['id']),
|
||||
$term_objtype,
|
||||
TERM_HASHTAG,
|
||||
Term::HASHTAG,
|
||||
DBA::escape($term),
|
||||
'',
|
||||
intval($owner_uid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue