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