diff --git a/sass/global.scss b/sass/global.scss index d9c94ac0c..f707ad298 100644 --- a/sass/global.scss +++ b/sass/global.scss @@ -45,6 +45,10 @@ a.rule_link { list-style-type: none !important; } +.ft_cataloguenumber { + width: 160px; +} + ul.collage_images { padding: 0px; width: 590px; diff --git a/sections/torrents/browse.php b/sections/torrents/browse.php index 335eadb08..7724538dc 100644 --- a/sections/torrents/browse.php +++ b/sections/torrents/browse.php @@ -212,27 +212,28 @@ Rip specifics: - - - + - + + + + + + diff --git a/sections/torrents/user.php b/sections/torrents/user.php index 1c3544a8c..ce3990bd3 100644 --- a/sections/torrents/user.php +++ b/sections/torrents/user.php @@ -45,14 +45,6 @@ $orderBy = $header->getOrderBy() . ' ' . $header->getOrderDir() . ($secondarySort ? ", $secondarySort" : ''); $headerIcons = new SortableTableHeader('time', $headerMap, ['asc' => '', 'desc' => '']); -if (!empty($_GET['page']) && is_number($_GET['page']) && $_GET['page'] > 0) { - $page = $_GET['page']; - $limit = ($page - 1) * TORRENTS_PER_PAGE.', '.TORRENTS_PER_PAGE; -} else { - $page = 1; - $limit = TORRENTS_PER_PAGE; -} - $cond = []; $args = []; if (!empty($_GET['format'])) { @@ -300,6 +292,10 @@ ", ...$args ); +$paginator = new Gazelle\Util\Paginator(10, (int)($_GET['page'] ?? 1)); +$paginator->setTotal($torrentCount); +array_push($args, $paginator->limit(), $paginator->offset()); + $DB->prepared_query(" SELECT t.GroupID, @@ -314,17 +310,15 @@ GROUP BY $groupBy $havingCondition ORDER BY $orderBy - LIMIT $limit + LIMIT ? OFFSET ? ", ...$args ); -$groupIDs = $DB->collect('GroupID'); +$groupIDs = $DB->collect('GroupID'); $torrentsInfo = $DB->to_array('TorrentID', MYSQLI_ASSOC); - -$results = Torrents::get_groups($groupIDs); -$action = display_str($_GET['type']); -$pages = Format::get_pages($page, $torrentCount, TORRENTS_PER_PAGE); -$urlStem = "torrents.php?userid={$userId}&type="; +$results = Torrents::get_groups($groupIDs); +$action = display_str($_GET['type']); +$urlStem = "torrents.php?userid={$userId}&type="; View::show_header($user->username() . "'s $action torrents", ['js' => 'voting']); ?> @@ -355,32 +349,32 @@ Rip specifics: - - - + +list(); + foreach ($releaseTypes as $id=>$type) { +?> + - - + + + + + + + @@ -390,25 +384,25 @@ @@ -416,8 +410,8 @@ Tags:   - />   - /> + />   + /> @@ -425,16 +419,16 @@ Order by @@ -472,7 +466,7 @@

torrent found.

- + linkbox() ?> @@ -485,7 +479,7 @@ id()); + $vote = new Gazelle\Vote($Viewer->id()); foreach ($torrentsInfo as $torrentID => $info) { [$groupID, , $time] = array_values($info); @@ -553,9 +547,9 @@
+ linkbox() ?> - {%- endfor %} {% endif %} + {% for sheet in style %} {{ css(sheet) }} {% endfor %}