From dac88fce56776cdd2e6957e6c4e9fa0988537e94 Mon Sep 17 00:00:00 2001 From: Domovoy Date: Sun, 5 Aug 2012 15:08:31 +0200 Subject: [PATCH] Remove database update, use fallback solution instead. --- boot.php | 2 +- include/conversation.php | 7 ++++++- update.php | 9 +-------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/boot.php b/boot.php index 014b840f27..7e3e9fee7b 100644 --- a/boot.php +++ b/boot.php @@ -13,7 +13,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '3.0.1425' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1155 ); +define ( 'DB_UPDATE_VERSION', 1154 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/include/conversation.php b/include/conversation.php index 345bb34ad8..706bcdde67 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -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; } diff --git a/update.php b/update.php index c41acf6fbc..19e6cf3bdf 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@