]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
Several default features are now in the core
[friendica.git] / mod / network.php
index bfd5e9e872f6c470ac9ac64ea7570a521e6461d4..58f9484250f2cd8e8f41f808948b7b1be5bdd48f 100644 (file)
@@ -160,9 +160,8 @@ function network_init(App $a)
                $a->page['aside'] = '';
        }
 
-       $a->page['aside'] .= (Feature::isEnabled(local_user(), 'groups') ?
-               Group::sidebarWidget('network/0', 'network', 'standard', $group_id) : '');
-       $a->page['aside'] .= (Feature::isEnabled(local_user(), 'forumlist_widget') ? ForumManager::widget(local_user(), $cid) : '');
+       $a->page['aside'] .= Group::sidebarWidget('network/0', 'network', 'standard', $group_id);
+       $a->page['aside'] .= ForumManager::widget(local_user(), $cid);
        $a->page['aside'] .= posted_date_widget('network', local_user(), false);
        $a->page['aside'] .= Widget::networks('network', (x($_GET, 'nets') ? $_GET['nets'] : ''));
        $a->page['aside'] .= saved_searches($search);
@@ -171,10 +170,6 @@ function network_init(App $a)
 
 function saved_searches($search)
 {
-       if (!Feature::isEnabled(local_user(), 'savedsearch')) {
-               return '';
-       }
-
        $a = get_app();
 
        $srchurl = '/network?f='
@@ -346,7 +341,7 @@ function networkConversation(App $a, $items, Pager $pager, $mode, $update, $orde
        // Set this so that the conversation function can find out contact info for our wall-wall items
        $a->page_contact = $a->contact;
 
-       if (!is_array($items)){
+       if (!is_array($items)) {
                Logger::log("Expecting items to be an array. Got " . print_r($items, true));
                $items = [];
        }
@@ -394,7 +389,7 @@ function network_content(App $a, $update = 0, $parent = 0)
                $o = networkThreadedView($a, $update, $parent);
        }
 
-       if ($o === ''){
+       if ($o === '') {
                info("No items found");
        }
 
@@ -472,7 +467,7 @@ function networkFlatView(App $a, $update = 0)
                }
                DBA::close($result);
 
-               if (count($posts) == 0){
+               if (count($posts) == 0) {
                        return '';
                }
                $condition = ['uid' => local_user(), 'id' => $posts];
@@ -993,16 +988,14 @@ function network_tabs(App $a)
                ],
        ];
 
-       if (Feature::isEnabled(local_user(), 'personal_tab')) {
-               $tabs[] = [
-                       'label' => L10n::t('Personal'),
-                       'url'   => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&conv=1',
-                       'sel'   => $conv_active,
-                       'title' => L10n::t('Posts that mention or involve you'),
-                       'id'    => 'personal-tab',
-                       'accesskey' => 'r',
-               ];
-       }
+       $tabs[] = [
+               'label' => L10n::t('Personal'),
+               'url'   => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&conv=1',
+               'sel'   => $conv_active,
+               'title' => L10n::t('Posts that mention or involve you'),
+               'id'    => 'personal-tab',
+               'accesskey' => 'r',
+       ];
 
        if (Feature::isEnabled(local_user(), 'new_tab')) {
                $tabs[] = [
@@ -1026,16 +1019,14 @@ function network_tabs(App $a)
                ];
        }
 
-       if (Feature::isEnabled(local_user(), 'star_posts')) {
-               $tabs[] = [
-                       'label' => L10n::t('Starred'),
-                       'url'   => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&star=1',
-                       'sel'   => $starred_active,
-                       'title' => L10n::t('Favourite Posts'),
-                       'id'    => 'starred-posts-tab',
-                       'accesskey' => 'm',
-               ];
-       }
+       $tabs[] = [
+               'label' => L10n::t('Starred'),
+               'url'   => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&star=1',
+               'sel'   => $starred_active,
+               'title' => L10n::t('Favourite Posts'),
+               'id'    => 'starred-posts-tab',
+               'accesskey' => 'm',
+       ];
 
        // save selected tab, but only if not in file mode
        if (!x($_GET, 'file')) {
@@ -1079,4 +1070,4 @@ function network_infinite_scroll_head(App $a, &$htmlhead)
                        '$reload_uri' => $pager->getBaseQueryString()
                ]);
        }
-}
\ No newline at end of file
+}