Refactor pkgbase_comments()

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-04-05 19:33:32 +02:00
parent 122636cbb6
commit 5415bc945a
2 changed files with 26 additions and 28 deletions

View file

@ -301,7 +301,8 @@ function pkg_display_details($id=0, $row, $SID="") {
include('pkg_comment_form.php');
}
$comments = pkgbase_comments($base_id);
$limit = isset($_GET['comments']) ? 0 : 10;
$comments = pkgbase_comments($base_id, $limit);
if (!empty($comments)) {
include('pkg_comments.php');
}