aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-28 18:45:11 -0800
committerfriendica <info@friendica.com>2012-11-28 18:45:11 -0800
commit05e08cb5d2967a12c479ab94187b1ef1bde0a094 (patch)
tree0b70e60b33da3985c5752d7caf0147f471408b91 /include/conversation.php
parent7c047bea332efaa11af0d02878d91823c4bba1ad (diff)
downloadvolse-hubzilla-05e08cb5d2967a12c479ab94187b1ef1bde0a094.tar.gz
volse-hubzilla-05e08cb5d2967a12c479ab94187b1ef1bde0a094.tar.bz2
volse-hubzilla-05e08cb5d2967a12c479ab94187b1ef1bde0a094.zip
trace through the threaded conversation spaghetti to bring back a sane looking network page
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php27
1 files changed, 23 insertions, 4 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 07ecf7207..ab2d15b1e 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -660,7 +660,6 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
'thread_level' => $thread_level,
);
- logger('tmp_item: ' . print_r($tmp_item,true));
$arr = array('item' => $item, 'output' => $tmp_item);
call_hooks('display_item', $arr);
@@ -803,6 +802,10 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
$page_dropping = ((local_user() && local_user() == $profile_owner) ? true : false);
+ if(! feature_enabled($profile_owner,'multi_delete'))
+ $page_dropping = false;
+
+
$channel = $a->get_channel();
$observer = $a->get_observer();
@@ -950,7 +953,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
'tags' => template_escape($tags),
'hashtags' => template_escape($hashtags),
'mentions' => template_escape($mentions),
- 'txt_cats' => t('Categories:'),
+ 'txt_cats' => t('Categories:'),
'txt_folders' => t('Filed under:'),
'has_cats' => ((count($categories)) ? 'true' : ''),
'has_folders' => ((count($folders)) ? 'true' : ''),
@@ -995,8 +998,6 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
{
// Normal View
- $page_template = get_markup_template("threaded_conversation.tpl");
-
require_once('include/ConversationObject.php');
require_once('include/ItemObject.php');
@@ -1023,8 +1024,13 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
continue;
}
+
+
+
$item['pagedrop'] = $page_dropping;
+
+
if($item['id'] == $item['parent']) {
$item_object = new Item($item);
$conv->add_thread($item_object);
@@ -1036,9 +1042,22 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
logger('[ERROR] conversation : Failed to get template data.', LOGGER_DEBUG);
$threads = array();
}
+
}
}
+
+ if($page_mode === 'traditional' || $page_mode === 'preview') {
+ $page_template = get_markup_template("threaded_conversation.tpl");
+ }
+ elseif($update) {
+ $page_template = get_markup_template("convobj.tpl");
+ }
+ else {
+ $page_template = get_markup_template("conv_frame.tpl");
+ $threads = null;
+ }
+
$o = replace_macros($page_template, array(
'$baseurl' => $a->get_baseurl($ssl_state),
'$live_update' => $live_update_div,