Comment::grab_comments() should use $iParentId when != NULL, not just !$iParentId as this prevents the use of

$iParentId in cases where the value is 0.  Fixes duplicate display of every comment for an application version reported by
Nick Law.
This commit is contained in:
Chris Morgan
2006-07-26 19:30:11 +00:00
committed by WineHQ
parent cef2aec209
commit 61d338abbd

View File

@@ -269,7 +269,9 @@ class Comment {
$iParentId = mysql_real_escape_string($iParentId);
$sExtra = "";
if($iParentId)
/* NOTE: we must compare against NULL here because $iParentId of 0 is valid */
if($iParentId != NULL)
$sExtra = "AND parentId = '".$iParentId."' ";
$sQuery = "SELECT from_unixtime(unix_timestamp(appComments.time), \"%W %M %D %Y, %k:%i\") as time, ".