﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
13939	get_page_of_comment returns wrong page number when changing threading level	laceous		"Initial discussion settings:
 * Enable threaded comments 2 levels deep
 * 5 top-level comments per page, first page by default
 * Older comments at top of each page

If I have comments on a post like:

'''cpage 1'''
 * comment-1
 * comment-2
 * comment-3
 * comment-4
 * comment-5
  * comment-6

{{{
$page = get_page_of_comment(6); // returns 1 which is the correct page
}}}

If I modify the initial discussion settings by disabling threading (e.g. changing the threading level to 1), the comments change to:

'''cpage 1'''
 * comment-1
 * comment-2
 * comment-3
 * comment-4
 * comment-5
'''cpage 2'''
 * comment-6

{{{
$page = get_page_of_comment(6); // returns 1 which is incorrect
}}}

This function doesn't follow the same algorithm as what is used to display the comments

This can potentially happen whenever you decrease the threading level from x to x-n"	defect (bug)	new	normal	Future Release	Comments	3.0	normal		has-patch needs-testing	
