From: Zach Prezkuta Date: Wed, 5 Sep 2012 00:47:49 +0000 (-0600) Subject: conversation needs preview parameter X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=79012bf8882baa6843726bcffbcafe959028c1bd;p=friendica.git conversation needs preview parameter --- diff --git a/include/conversation.php b/include/conversation.php index 1fc0642856..90efc6d247 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -346,7 +346,7 @@ function count_descendants($item) { * Recursively prepare a thread for HTML */ -function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, $thread_level=1) { +function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, $previewing, $thread_level=1) { $result = array(); $wall_template = 'wall_thread.tpl'; @@ -651,7 +651,7 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr $item_result['children'] = array(); if(count($item['children'])) { - $item_result['children'] = prepare_threads_body($a, $item['children'], $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, ($thread_level + 1)); + $item_result['children'] = prepare_threads_body($a, $item['children'], $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, $previewing, ($thread_level + 1)); } $item_result['private'] = $item['private']; $item_result['toplevel'] = ($toplevelpost ? 'toplevel_item' : ''); @@ -901,7 +901,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { } } - $threads = prepare_threads_body($a, $threads, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike); + $threads = prepare_threads_body($a, $threads, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, $previewing); } } diff --git a/mod/item.php b/mod/item.php index 6c1c06f99a..c2033d2503 100644 --- a/mod/item.php +++ b/mod/item.php @@ -608,7 +608,7 @@ function item_post(&$a) { if($preview) { require_once('include/conversation.php'); - $o = conversation($a,array(array_merge($contact_record,$datarray)),'search', false); + $o = conversation($a,array(array_merge($contact_record,$datarray)),'search', false, true); logger('preview: ' . $o); echo json_encode(array('preview' => $o)); killme(); diff --git a/view/theme/frost/wall_item.tpl b/view/theme/frost/wall_item.tpl index fb9290f12c..e2cb60dbe0 100644 --- a/view/theme/frost/wall_item.tpl +++ b/view/theme/frost/wall_item.tpl @@ -1,6 +1,6 @@ -
+