From 63d0ea9914c1cd1b6b91d2b47f0cb05491b076b9 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 14 Oct 2008 20:39:42 +0000 Subject: - Patch #296485 by johnskulski, catch: fixed problem with comment threading. --- modules/comment/comment.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index db663aa87..341767aa3 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -719,7 +719,7 @@ function comment_save($edit) { // Strip the "/" from the end of the parent thread. $parent->thread = (string) rtrim((string) $parent->thread, '/'); // Get the max value in *this* thread. - $max = db_query("SELECT MAX(thread) FROM {comments} WHERE thread LIKE :thread AND nid = :nid", array(':thread' => $parent->thread .'%', ':nid' => $edit['nid']))->fetchField(); + $max = db_query("SELECT MAX(thread) FROM {comments} WHERE thread LIKE :thread AND nid = :nid", array(':thread' => $parent->thread .'.%', ':nid' => $edit['nid']))->fetchField(); if ($max == '') { // First child of this parent. -- cgit v1.2.3