Commit 25711594 authored by Johannes Löthberg's avatar Johannes Löthberg Committed by Lukas Fleischer
Browse files

Allow paginating package comments


Signed-off-by: Johannes Löthberg's avatarJohannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent 3578e77a
......@@ -291,9 +291,10 @@ function pkgbase_display_details($base_id, $row, $SID="") {
unset($pinned);
$limit = isset($_GET['comments']) ? 0 : 10;
$comments = pkgbase_comments($base_id, $limit, $include_deleted);
$total_comment_count = pkgbase_comments_count($base_id, $include_deleted);
list($pagination_templs, $per_page, $offset) = calculate_pagination($total_comment_count);
$comments = pkgbase_comments($base_id, $per_page, $include_deleted, false, $offset);
if (!empty($comments)) {
$comment_section = "package";
include('pkg_comments.php');
......
......@@ -630,9 +630,10 @@ function pkg_display_details($id=0, $row, $SID="") {
unset($pinned);
$limit = isset($_GET['comments']) ? 0 : 10;
$comments = pkgbase_comments($base_id, $limit, $include_deleted);
$total_comment_count = pkgbase_comments_count($base_id, $include_deleted);
list($pagination_templs, $per_page, $offset) = calculate_pagination($total_comment_count);
$comments = pkgbase_comments($base_id, $per_page, $include_deleted, false, $offset);
if (!empty($comments)) {
$comment_section = "package";
include('pkg_comments.php');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment