Commit 63d0ea99 authored by Dries's avatar Dries
Browse files

- Patch #296485 by johnskulski, catch: fixed problem with comment threading.

parent 126a5e3c
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment