From 79012bf8882baa6843726bcffbcafe959028c1bd Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Tue, 4 Sep 2012 18:47:49 -0600 Subject: [PATCH] conversation needs preview parameter --- include/conversation.php | 6 +++--- mod/item.php | 2 +- view/theme/frost/wall_item.tpl | 2 +- view/theme/frost/wall_thread.tpl | 2 +- view/theme/frost/wallwall_item.tpl | 2 +- view/theme/frost/wallwall_thread.tpl | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 1fc064285..90efc6d24 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 6c1c06f99..c2033d250 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 fb9290f12..e2cb60dbe 100644 --- a/view/theme/frost/wall_item.tpl +++ b/view/theme/frost/wall_item.tpl @@ -1,6 +1,6 @@ -
+