ChangeSet ID: 26846 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2006/07/26 14:30:11
Modified files: include : comment.php
Log message: Chris Morgan cmorgan@alum.wpi.edu 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.
Patch: http://cvs.winehq.org/patch.py?id=26846
Old revision New revision Changes Path 1.29 1.30 +3 -1 appdb/include/comment.php
Index: appdb/include/comment.php diff -u -p appdb/include/comment.php:1.29 appdb/include/comment.php:1.30 --- appdb/include/comment.php:1.29 26 Jul 2006 19:30:11 -0000 +++ appdb/include/comment.php 26 Jul 2006 19:30:11 -0000 @@ -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, ".