Remove database update, use fallback solution instead.

This commit is contained in:
Domovoy 2012-08-05 15:08:31 +02:00
parent e247915f48
commit dac88fce56
3 changed files with 8 additions and 10 deletions

View file

@ -1151,7 +1151,12 @@ function get_item_children($arr, $parent) {
foreach($arr as $item) {
if($item['id'] != $item['parent']) {
if(get_config('system','thread_allow')) {
if($item['thr-parent'] == $parent['uri']) {
// Fallback to parent-uri if thr-parent is not set
$thr_parent = $item['thr-parent'];
if($thr_parent == '')
$thr_parent = $item['parent-uri'];
if($thr_parent == $parent['uri']) {
$item['children'] = get_item_children($arr, $item);
$children[] = $item;
}