aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/conversation.php b/include/conversation.php
index f4432bfd9..1b1d09d6b 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -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) {