summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/pkgfuncs.inc17
1 files changed, 10 insertions, 7 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index b6f32e6a..150f5527 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -180,7 +180,7 @@ function package_comments($pkgid=0) {
$q.= " AND DelUsersID = 0"; # only display non-deleted comments
$q.= " ORDER BY CommentTS DESC";
$result = db_query($q, $dbh);
- if (!$result) {return array();}
+ if (!$result) {print 'poop';return array();}
while ($row = mysql_fetch_assoc($result)) {
$comments[] = $row;
}
@@ -272,20 +272,22 @@ function package_details($id=0, $SID="") {
global $pkgsearch_vars;
$atype = account_from_sid($SID);
$uid = uid_from_sid($SID);
+
$q = "SELECT Packages.*,Location,Category ";
$q.= "FROM Packages,PackageLocations,PackageCategories ";
$q.= "WHERE Packages.LocationID = PackageLocations.ID ";
$q.= "AND Packages.CategoryID = PackageCategories.ID ";
- $q.= "AND Packages.ID = ".intval($_REQUEST["ID"]);
+ $q.= "AND Packages.ID = " . intval($_REQUEST['ID']);
$dbh = db_connect();
$results = db_query($q, $dbh);
- if (!$results) {
- print __("Error retrieving package details.")."<br />\n";
- } else {
+ if (!$results) {
+ print __("Error retrieving package details.") . "<br />\n";
+ }
+ else {
$row = mysql_fetch_assoc($results);
if (empty($row)) {
- print __("Package details could not be found.")."<br />\n";
+ print __("Package details could not be found.") . "<br />\n";
}
else {
@@ -294,10 +296,11 @@ function package_details($id=0, $SID="") {
# Actions Bar
if ($SID) {
include('actions_form.php');
+ include('pkg_comment_form.php');
}
# Print Comments
- $comments = package_comments($row["ID"]);
+ $comments = package_comments($_REQUEST['ID']);
if (!empty($comments)) {
include('pkg_comments.php');
}