]> git.mxchange.org Git - friendica.git/commitdiff
Add ability for themes to prevent threading (see friendica/friendica@5e09fc31f51ee1cc...
authorDomovoy <domovoy@errlock.org>
Sat, 18 Aug 2012 15:49:07 +0000 (17:49 +0200)
committerDomovoy <domovoy@errlock.org>
Sat, 18 Aug 2012 15:49:07 +0000 (17:49 +0200)
object/Item.php

index b1656ed0553dbc82f4c0aecdee59f0865a30a97b..17b2cbe7bae6bcd4688b92e22098a265a308963c 100644 (file)
@@ -216,7 +216,7 @@ class Item extends BaseObject {
                        'vote' => $buttons,
                        'like' => $like,
                        'dislike' => $dislike,
-                       'comment' => $this->get_comment_box(),
+                       'comment' => $this->get_comment_box($indent),
                        'previewing' => $previewing,
                        'wait' => t('Please wait'),
                );
@@ -250,7 +250,7 @@ class Item extends BaseObject {
                $result['private'] = $item['private'];
                $result['toplevel'] = ($this->is_toplevel() ? 'toplevel_item' : '');
 
-               if(get_config('system','thread_allow')) {
+               if(get_config('system','thread_allow') && $a->theme_thread_allow) {
                        $result['flatten'] = false;
                        $result['threaded'] = true;
                }
@@ -464,7 +464,7 @@ class Item extends BaseObject {
         *              _ The comment box string (empty if no comment box)
         *              _ false on failure
         */
-       private function get_comment_box() {
+       private function get_comment_box($indent) {
                if(!$this->is_toplevel() && !get_config('system','thread_allow')) {
                        return '';
                }
@@ -510,6 +510,7 @@ class Item extends BaseObject {
                                '$edurl' => t('Link'),
                                '$edvideo' => t('Video'),
                                '$preview' => t('Preview'),
+                               '$indent' => $indent,
                                '$sourceapp' => t($a->sourcename),
                                '$ww' => (($conv->get_mode() === 'network') ? $ww : '')
                        ));