]> git.mxchange.org Git - friendica.git/commitdiff
Move network sidebar widget additional features to core
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 13 Jul 2020 02:52:51 +0000 (22:52 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 13 Jul 2020 02:52:51 +0000 (22:52 -0400)
- Make Archives filter core
- Make Protocol filter core

src/Content/Feature.php
src/Content/Widget.php

index ee755a2b3553356a37b4d937329b5a26566c4290..b35aa3f363425ac50b9ef02cc50ad0f35cea5447 100644 (file)
@@ -107,13 +107,6 @@ class Feature
                                ['explicit_mentions', DI::l10n()->t('Explicit Mentions'), DI::l10n()->t('Add explicit mentions to comment box for manual control over who gets mentioned in replies.'), false, DI::config()->get('feature_lock', 'explicit_mentions', false)],
                        ],
 
-                       // Network sidebar widgets
-                       'widgets' => [
-                               DI::l10n()->t('Network Sidebar'),
-                               ['archives',         DI::l10n()->t('Archives'), DI::l10n()->t('Ability to select posts by date ranges'), false, DI::config()->get('feature_lock', 'archives', false)],
-                               ['networks',         DI::l10n()->t('Protocol Filter'), DI::l10n()->t('Enable widget to display Network posts only from selected protocols'), false, DI::config()->get('feature_lock', 'networks', false)],
-                       ],
-
                        // Item tools
                        'tools' => [
                                DI::l10n()->t('Post/Comment Tools'),
index 8c72f68f4c5c651bd016a17e0caae8587a86568c..ffc5debb3361a20544c69c8af2c8e25c2d9f346f 100644 (file)
@@ -269,10 +269,6 @@ class Widget
                        return '';
                }
 
-               if (!Feature::isEnabled(local_user(), 'networks')) {
-                       return '';
-               }
-
                $extra_sql = self::unavailableNetworks();
 
                $r = DBA::p("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = ? AND NOT `deleted` AND `network` != '' $extra_sql ORDER BY `network`",
@@ -497,10 +493,6 @@ class Widget
        {
                $o = '';
 
-               if (!Feature::isEnabled($uid, 'archives')) {
-                       return $o;
-               }
-
                $visible_years = DI::pConfig()->get($uid, 'system', 'archive_visible_years', 5);
 
                /* arrange the list in years */