From eb75246a9e6b464e2671ab8ec183bad2b0992d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sun, 11 Nov 2007 23:07:48 +0100 Subject: [PATCH] Fix comments display --- include/comment.php | 8 ++++---- 1 file 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, ".