From: friendica Date: Wed, 22 Aug 2012 02:41:50 +0000 (-0700) Subject: restore old comment behaviour when threading turned off X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ff0e0782a571f25b902080c52a83de4f41e0eb7e;p=friendica.git restore old comment behaviour when threading turned off --- diff --git a/include/conversation.php b/include/conversation.php index ee8e73cebe..f7d0298124 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -508,6 +508,13 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr } } + if(intval(get_config('system','thread_allow')) && $a->theme_thread_allow) { + $comments_threaded = true; + } + else { + $comments_threaded = false; + } + if($page_writeable) { $buttons = array( 'like' => array( t("I like this \x28toggle\x29"), t("like")), @@ -524,7 +531,8 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr $qcomment = (($qc) ? explode("\n",$qc) : null); } $comment = replace_macros($cmnt_tpl,array( - '$return_path' => '', + '$return_path' => '', + '$threaded' => $comments_threaded, '$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''), '$type' => (($mode === 'profile') ? 'wall-comment' : 'net-comment'), '$id' => $item['item_id'], diff --git a/view/comment_item.tpl b/view/comment_item.tpl index b2be6f94e3..98173aa306 100644 --- a/view/comment_item.tpl +++ b/view/comment_item.tpl @@ -1,6 +1,10 @@
+ {{ if $threaded }} $comment