Commit 9e0f5901 by Scott

Fix AJAX comment expander for duplicates and follow-on questions

parent e81b2ccf
......@@ -34,24 +34,27 @@
$parentid=qa_post_text('c_parentid');
$userid=qa_get_logged_in_userid();
list($question, $parent, $children)=qa_db_select_with_pending(
list($question, $parent, $children, $duplicateposts) = qa_db_select_with_pending(
qa_db_full_post_selectspec($userid, $questionid),
qa_db_full_post_selectspec($userid, $parentid),
qa_db_full_child_posts_selectspec($userid, $parentid)
qa_db_full_child_posts_selectspec($userid, $parentid),
qa_db_post_duplicates_selectspec($questionid)
);
if (isset($parent)) {
$parent=$parent+qa_page_q_post_rules($parent, null, null, $children);
$parent = $parent + qa_page_q_post_rules($parent, null, null, $children+$duplicateposts);
// in theory we should retrieve the parent's parent and siblings for the above, but they're not going to be relevant
foreach ($children as $key => $child)
$children[$key]=$child+qa_page_q_post_rules($child, $parent, $children, null);
$usershtml=qa_userids_handles_html($children, true);
$commentsfollows = qa_page_q_load_c_follows($question, $children, array(), $duplicateposts);
qa_sort_by($children, 'created');
$usershtml=qa_userids_handles_html($commentsfollows, true);
$c_list=qa_page_q_comment_follow_list($question, $parent, $children, true, $usershtml, false, null);
qa_sort_by($commentsfollows, 'created');
$c_list=qa_page_q_comment_follow_list($question, $parent, $commentsfollows, true, $usershtml, false, null);
$themeclass=qa_load_theme_class(qa_get_site_theme(), 'ajax-comments', null, null);
$themeclass->initialize();
......
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