diff options
author | friendica <info@friendica.com> | 2012-01-03 14:27:00 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-01-03 14:27:00 -0800 |
commit | c583d1620955b8d170b8cbf7a106cefeecad56c8 (patch) | |
tree | 4d70947824ea489c72725c88e15d663d9cf8f788 /include/conversation.php | |
parent | 184230e06826117b1d87241e3acdf19935470e8f (diff) | |
download | volse-hubzilla-c583d1620955b8d170b8cbf7a106cefeecad56c8.tar.gz volse-hubzilla-c583d1620955b8d170b8cbf7a106cefeecad56c8.tar.bz2 volse-hubzilla-c583d1620955b8d170b8cbf7a106cefeecad56c8.zip |
fix reference variable effects on sorting
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 10 |
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) { |