summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2009-02-20 20:59:07 -0500
committerLoui Chang <louipc.ist@gmail.com>2009-02-20 20:59:07 -0500
commit402c6d0933127d5337b33f4a3fdb45615c6300d6 (patch)
tree01bb5fe8076a8215cc7cf66c984d7be8a95f2a5d /web/lib
parenta669db5c7a4fc93859c6465b234dbf12f178390d (diff)
downloadaurweb-402c6d0933127d5337b33f4a3fdb45615c6300d6.tar.xz
Fix the comment poop bug.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/pkgfuncs.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 5ce659e..b95f910 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -180,7 +180,11 @@ 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) {print 'poop';return array();}
+
+ if (!$result) {
+ return;
+ }
+
while ($row = mysql_fetch_assoc($result)) {
$comments[] = $row;
}
@@ -268,7 +272,6 @@ function pkgname_from_id($id="") {
# display package details
#
function package_details($id=0, $SID="") {
- global $_REQUEST;
global $pkgsearch_vars;
$atype = account_from_sid($SID);
$uid = uid_from_sid($SID);
@@ -277,7 +280,7 @@ function package_details($id=0, $SID="") {
$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($id);
$dbh = db_connect();
$results = db_query($q, $dbh);
@@ -300,7 +303,7 @@ function package_details($id=0, $SID="") {
}
# Print Comments
- $comments = package_comments($_REQUEST['ID']);
+ $comments = package_comments($id);
if (!empty($comments)) {
include('pkg_comments.php');
}