Threads are now always enabled.

This commit is contained in:
Michael 2017-11-28 18:54:39 +00:00
parent e8bac99728
commit 8bffee43b3
9 changed files with 5 additions and 30 deletions

View file

@ -1517,15 +1517,13 @@ function conv_sort(array $item_list, $order)
usort($parents, 'sort_thr_commented');
}
$thread_allowed = Config::get('system', 'thread_allow') && get_app()->theme_thread_allow;
/*
* Plucks children from the item_array, second pass collects eventual orphan
* items and add them as children of their top-level post.
*/
foreach ($parents as $i => $parent) {
$parents[$i]['children'] =
array_merge(get_item_children($item_array, $parent, $thread_allowed),
array_merge(get_item_children($item_array, $parent, true),
get_item_children($item_array, $parent, false));
}
@ -1533,7 +1531,7 @@ function conv_sort(array $item_list, $order)
$parents[$i]['children'] = sort_item_children($parents[$i]['children']);
}
if ($thread_allowed && PConfig::get(local_user(), 'system', 'smart_threading', 0)) {
if (PConfig::get(local_user(), 'system', 'smart_threading', 0)) {
foreach ($parents as $i => $parent) {
$parents[$i] = smart_flatten_conversation($parent);
}