diff --git a/modules/comment.module b/modules/comment.module index 509341ede2764b8f500b38162425100432ed3c77..22c7c8aaa17c7ba81f6a28d5aeca14c968f26c34 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -73,17 +73,17 @@ function comment_is_new($comment) { global $user; static $date; - if (!$date) { + if (!$date[$comment->nid]) { if ($user->uid) { $history = db_fetch_object(db_query("SELECT timestamp FROM history WHERE uid = '$user->uid' AND nid = '$comment->nid'")); - $date = $history->timestamp ? $history->timestamp : 0; + $date[$comment->nid] = $history->timestamp ? $history->timestamp : 0; } else { - $date = time(); + $date[$comment->nid] = time(); } } - if ($comment->timestamp > $date) { + if ($comment->timestamp > $date[$comment->nid]) { return 1; } else { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 509341ede2764b8f500b38162425100432ed3c77..22c7c8aaa17c7ba81f6a28d5aeca14c968f26c34 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -73,17 +73,17 @@ function comment_is_new($comment) { global $user; static $date; - if (!$date) { + if (!$date[$comment->nid]) { if ($user->uid) { $history = db_fetch_object(db_query("SELECT timestamp FROM history WHERE uid = '$user->uid' AND nid = '$comment->nid'")); - $date = $history->timestamp ? $history->timestamp : 0; + $date[$comment->nid] = $history->timestamp ? $history->timestamp : 0; } else { - $date = time(); + $date[$comment->nid] = time(); } } - if ($comment->timestamp > $date) { + if ($comment->timestamp > $date[$comment->nid]) { return 1; } else {