diff options
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/pkg_comments.php | 2 | ||||
-rw-r--r-- | web/template/pkg_details.php | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index aed9ca8b..ac6e1de9 100644 --- a/web/template/pkg_comments.php +++ b/web/template/pkg_comments.php @@ -36,7 +36,7 @@ while (list($indx, $carr) = each($comments)) { ?> </div> <?php -$count = package_comments_count($_GET['ID']); +$count = package_comments_count(isset($_GET['ID']) ? $_GET['ID'] : pkgid_from_name($_GET['N'])); if ($count > 10 && !isset($_GET['comments'])) { echo '<div class="pgbox">'; echo '<a href="'. $_SERVER['REQUEST_URI'] . '&comments=all">'. __('Show all %s comments', $count) . '</a>'; diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 046f836b..230cc2c6 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -2,7 +2,13 @@ $atype = account_from_sid($SID); $uid = uid_from_sid($SID); -$pkgid = intval($_REQUEST['ID']); +if (isset($_REQUEST['ID'])) { + $pkgid = intval($_REQUEST['ID']); +} +else { + $pkgid = pkgid_from_name($_REQUEST['N']); +} + if ($uid == $row["MaintainerUID"] or ($atype == "Developer" or $atype == "Trusted User")) { |