Fix offset is absolute in set not a page to be consistent with SQL

This commit is contained in:
Hank Grabowski 2023-02-17 13:23:34 -05:00
parent e6c93d31c1
commit df4af8da9b

View File

@ -652,7 +652,7 @@ class Tag
if (empty($tags)) { if (empty($tags)) {
$tags = self::setGlobalTrendingHashtags($period, 1000); $tags = self::setGlobalTrendingHashtags($period, 1000);
} }
return array_slice($tags, $limit * $offset, $limit); return array_slice($tags, $offset, $limit);
} }
/** /**
@ -735,7 +735,7 @@ class Tag
if (empty($tags)) { if (empty($tags)) {
$tags = self::setLocalTrendingHashtags($period, 1000); $tags = self::setLocalTrendingHashtags($period, 1000);
} }
return array_slice($tags, $limit * $offset, $limit); return array_slice($tags, $offset, $limit);
} }
/** /**