Endless scrolling for searches and contact comments

This commit is contained in:
Michael 2020-09-30 19:14:13 +00:00
parent 0b37f1d56c
commit 88a0e976da
10 changed files with 77 additions and 23 deletions

View file

@ -462,11 +462,17 @@ class Tag
* @param integer $uid
* @param integer $start
* @param integer $limit
* @param integer $last_uriid
* @return array with URI-ID
*/
public static function getURIIdListByTag(string $search, int $uid = 0, int $start = 0, int $limit = 100)
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` = ?))", $search, $uid];
if (!empty($last_uriid)) {
$condition = DBA::mergeConditions($condition, ["`uri-id` < ?", $last_uriid]);
}
$params = [
'order' => ['uri-id' => true],
'group_by' => ['uri-id'],