]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Features to src
[friendica.git] / include / conversation.php
index 7e6fefc6470072788b0960cfea412fa3075f97a6..b32a98426e9ea628245c4cd41e8a8d1a0b8de0bb 100644 (file)
@@ -3,6 +3,7 @@
  * @file include/conversation.php
  */
 use Friendica\App;
+use Friendica\Content\Features;
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
 use Friendica\Core\System;
@@ -915,7 +916,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                '$mode' => $mode,
                '$user' => $a->user,
                '$threads' => $threads,
-               '$dropping' => ($page_dropping && feature_enabled(local_user(), 'multi_delete') ? t('Delete Selected Items') : False),
+               '$dropping' => ($page_dropping && Features::isEnabled(local_user(), 'multi_delete') ? t('Delete Selected Items') : False),
        ));
 
        return $o;
@@ -1305,7 +1306,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) {
                '$title' => $x['title'],
                '$placeholdertitle' => t('Set title'),
                '$category' => $x['category'],
-               '$placeholdercategory' => (feature_enabled(local_user(), 'categories') ? t('Categories (comma-separated list)') : ''),
+               '$placeholdercategory' => (Features::isEnabled(local_user(), 'categories') ? t('Categories (comma-separated list)') : ''),
                '$wait' => t('Please wait'),
                '$permset' => t('Permission settings'),
                '$shortpermset' => t('permissions'),
@@ -1321,7 +1322,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) {
                '$lockstate' => $x['lockstate'],
                '$bang' => $x['bang'],
                '$profile_uid' => $x['profile_uid'],
-               '$preview' => ((feature_enabled($x['profile_uid'],'preview')) ? t('Preview') : ''),
+               '$preview' => ((Features::isEnabled($x['profile_uid'],'preview')) ? t('Preview') : ''),
                '$jotplugins' => $jotplugins,
                '$notes_cid' => $notes_cid,
                '$sourceapp' => t($a->sourcename),
@@ -1517,15 +1518,13 @@ function conv_sort(array $item_list, $order)
                usort($parents, 'sort_thr_commented');
        }
 
-       $thread_allowed = Config::get('system', 'thread_allow') && get_app()->theme_thread_allow;
-
        /*
         * Plucks children from the item_array, second pass collects eventual orphan
         * items and add them as children of their top-level post.
         */
        foreach ($parents as $i => $parent) {
                $parents[$i]['children'] =
-                       array_merge(get_item_children($item_array, $parent, $thread_allowed),
+                       array_merge(get_item_children($item_array, $parent, true),
                                get_item_children($item_array, $parent, false));
        }
 
@@ -1533,7 +1532,7 @@ function conv_sort(array $item_list, $order)
                $parents[$i]['children'] = sort_item_children($parents[$i]['children']);
        }
 
-       if ($thread_allowed && PConfig::get(local_user(), 'system', 'smart_threading', 0)) {
+       if (PConfig::get(local_user(), 'system', 'smart_threading', 0)) {
                foreach ($parents as $i => $parent) {
                        $parents[$i] = smart_flatten_conversation($parent);
                }