mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
Fix calculating total torrent bookmarks
This commit is contained in:
@@ -247,6 +247,16 @@ class Bookmark extends \Gazelle\BaseUser {
|
||||
);
|
||||
}
|
||||
|
||||
public function tgroupTotal(): int {
|
||||
return (int)self::$db->scalar("
|
||||
SELECT count(*)
|
||||
FROM bookmarks_torrents
|
||||
WHERE UserID = ?
|
||||
", $this->id
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function artistList(): array {
|
||||
self::$db->prepared_query("
|
||||
SELECT ag.ArtistID AS artist_id,
|
||||
|
||||
@@ -34,12 +34,12 @@ $reportMan = new Manager\Report($userMan);
|
||||
$tgMan = new Manager\TGroup();
|
||||
$torMan = new Manager\Torrent();
|
||||
$collMan = new Manager\Collage()->setImageProxy(new Util\ImageProxy($Viewer));
|
||||
$NumGroups = $bookmark->tgroupTotal();
|
||||
|
||||
$paginator = new Util\Paginator(200, (int)($_GET['page'] ?? 1));
|
||||
$paginator->setTotal($bookmark->torrentTotal());
|
||||
$paginator->setTotal($NumGroups);
|
||||
|
||||
$bookmarkList = $bookmark->tgroupList($paginator->limit(), $paginator->offset());
|
||||
$NumGroups = count($bookmarkList);
|
||||
$artistLeaderboard = $bookmark->tgroupArtistLeaderboard();
|
||||
$tagLeaderboard = $bookmark->tgroupTagLeaderboard();
|
||||
$CollageCovers = (int)($Viewer->option('CollageCovers') ?? 25);
|
||||
|
||||
Reference in New Issue
Block a user