Alexander Nicolaysen Sørnes : Fix comments display
Module: appdb Branch: master Commit: eb75246a9e6b464e2671ab8ec183bad2b0992d63 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=eb75246a9e6b464e2671ab8ec... Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sun Nov 11 23:07:48 2007 +0100 Fix comments display --- include/comment.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/comment.php b/include/comment.php index 38d419e..63554bf 100644 --- a/include/comment.php +++ b/include/comment.php @@ -292,15 +292,15 @@ class Comment { $iVersionId = query_escape_string($iVersionId); $iParentId = query_escape_string($iParentId); - $sExtra = ""; - - $sOrderingMode = "DESC"; - /* NOTE: we must compare against NULL here because $iParentId of 0 is valid */ if($iParentId) { $sExtra = "AND parentId = '".$iParentId."' "; $sOrderingMode = "ASC"; + } else + { + $sExtra = "AND parentId = '0'"; + $sOrderingMode = "DESC"; } $sQuery = "SELECT from_unixtime(unix_timestamp(appComments.time), \"%W %M %D %Y, %k:%i\") as time, ".
participants (1)
-
Chris Morgan