fix reference variable effects on sorting

This commit is contained in:
friendica 2012-01-03 14:27:00 -08:00
parent 184230e068
commit c583d16209
4 changed files with 10 additions and 6 deletions

View file

@ -911,9 +911,13 @@ function conv_sort($arr,$order) {
$parents[$p]['children'][] = $x;
}
}
foreach($parents as $x)
if(count($x['children']))
usort($x['children'],'sort_thr_created_rev');
foreach($parents as $k => $v) {
if(count($parents[$k]['children'])) {
$y = $parents[$k]['children'];
usort($y,'sort_thr_created_rev');
$parents[$k]['children'] = $y;
}
}
$ret = array();
foreach($parents as $x) {