mirror of
https://github.com/friendica/friendica
synced 2025-04-26 16:30:12 +00:00
post/thread views are renamed, search bugs fixed
This commit is contained in:
parent
574f778411
commit
1792046a4f
20 changed files with 83 additions and 77 deletions
|
@ -455,12 +455,11 @@ 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 `post-view` WHERE `network` IN (?, ?, ?, ?))",
|
||||
$search, $uid, Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
|
||||
$params = ['group_by' => ['uri-id']];
|
||||
$condition = ["`name` = ? AND (`uid` = ? OR (`uid` = ? AND NOT `global`))
|
||||
AND (`network` IN (?, ?, ?, ?) OR (`uid` = ? AND `uid` != ?))",
|
||||
$search, 0, $uid, Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, $uid, 0];
|
||||
|
||||
return DBA::count('tag-search-view', $condition, $params);
|
||||
return DBA::count('tag-search-view', $condition);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -475,9 +474,9 @@ 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 `post-view` WHERE `network` IN (?, ?, ?, ?))",
|
||||
$search, $uid, Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
|
||||
$condition = ["`name` = ? AND (`uid` = ? OR (`uid` = ? AND NOT `global`))
|
||||
AND (`network` IN (?, ?, ?, ?) OR (`uid` = ? AND `uid` != ?))",
|
||||
$search, 0, $uid, Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, $uid, 0];
|
||||
|
||||
if (!empty($last_uriid)) {
|
||||
$condition = DBA::mergeConditions($condition, ["`uri-id` < ?", $last_uriid]);
|
||||
|
@ -485,7 +484,6 @@ class Tag
|
|||
|
||||
$params = [
|
||||
'order' => ['uri-id' => true],
|
||||
'group_by' => ['uri-id'],
|
||||
'limit' => [$start, $limit]
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue