"item" is replaced by "post-view" / postupdate check added

This commit is contained in:
Michael 2021-01-17 20:32:13 +00:00
parent d29bad0cb2
commit 4157db5473
28 changed files with 104 additions and 782 deletions

View file

@ -452,7 +452,7 @@ class Tag
public static function countByTag(string $search, int $uid = 0)
{
$condition = ["`name` = ? AND (NOT `private` OR (`private` AND `uid` = ?))
AND `uri-id` IN (SELECT `uri-id` FROM `item` WHERE `network` IN (?, ?, ?, ?))",
AND `uri-id` IN (SELECT `uri-id` FROM `post-view` WHERE `network` IN (?, ?, ?, ?))",
$search, $uid, Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
$params = ['group_by' => ['uri-id']];
@ -472,7 +472,7 @@ class Tag
public static function getURIIdListByTag(string $search, int $uid = 0, int $start = 0, int $limit = 100, int $last_uriid = 0)
{
$condition = ["`name` = ? AND (NOT `private` OR (`private` AND `uid` = ?))
AND `uri-id` IN (SELECT `uri-id` FROM `item` WHERE `network` IN (?, ?, ?, ?))",
AND `uri-id` IN (SELECT `uri-id` FROM `post-view` WHERE `network` IN (?, ?, ?, ?))",
$search, $uid, Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
if (!empty($last_uriid)) {