]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Settings/Display.php
Merge pull request #1 from friendica/develop
[friendica.git] / src / Module / Settings / Display.php
index 34817b5fcfef1c036a4bb075f4b393622d57fd99..bde049718d9377824a20c866c27987cb0e16e3f2 100644 (file)
@@ -51,6 +51,7 @@ class Display extends BaseSettings
                $infinite_scroll    = !empty($_POST['infinite_scroll'])    ? intval($_POST['infinite_scroll'])    : 0;
                $no_auto_update     = !empty($_POST['no_auto_update'])     ? intval($_POST['no_auto_update'])     : 0;
                $no_smart_threading = !empty($_POST['no_smart_threading']) ? intval($_POST['no_smart_threading']) : 0;
+               $hide_dislike       = !empty($_POST['hide_dislike'])       ? intval($_POST['hide_dislike'])       : 0;
                $browser_update     = !empty($_POST['browser_update'])     ? intval($_POST['browser_update'])     : 0;
                if ($browser_update != -1) {
                        $browser_update = $browser_update * 1000;
@@ -83,6 +84,7 @@ class Display extends BaseSettings
                DI::pConfig()->set(local_user(), 'system', 'no_smilies'              , $nosmile);
                DI::pConfig()->set(local_user(), 'system', 'infinite_scroll'         , $infinite_scroll);
                DI::pConfig()->set(local_user(), 'system', 'no_smart_threading'      , $no_smart_threading);
+               DI::pConfig()->set(local_user(), 'system', 'hide_dislike'            , $hide_dislike);
                DI::pConfig()->set(local_user(), 'system', 'first_day_of_week'       , $first_day_of_week);
 
                if (in_array($theme, Theme::getAllowedList())) {
@@ -163,6 +165,7 @@ class Display extends BaseSettings
                $nosmile            = DI::pConfig()->get(local_user(), 'system', 'no_smilies', 0);
                $infinite_scroll    = DI::pConfig()->get(local_user(), 'system', 'infinite_scroll', 0);
                $no_smart_threading = DI::pConfig()->get(local_user(), 'system', 'no_smart_threading', 0);
+               $hide_dislike       = DI::pConfig()->get(local_user(), 'system', 'hide_dislike', 0);
 
                $first_day_of_week = DI::pConfig()->get(local_user(), 'system', 'first_day_of_week', 0);
                $weekdays = [0 => DI::l10n()->t("Sunday"), 1 => DI::l10n()->t("Monday")];
@@ -194,10 +197,11 @@ class Display extends BaseSettings
                        '$itemspage_network'        => ['itemspage_network'       , DI::l10n()->t('Number of items to display per page:'), $itemspage_network, DI::l10n()->t('Maximum of 100 items')],
                        '$itemspage_mobile_network' => ['itemspage_mobile_network', DI::l10n()->t('Number of items to display per page when viewed from mobile device:'), $itemspage_mobile_network, DI::l10n()->t('Maximum of 100 items')],
                        '$ajaxint'                  => ['browser_update'          , DI::l10n()->t('Update browser every xx seconds'), $browser_update, DI::l10n()->t('Minimum of 10 seconds. Enter -1 to disable it.')],
-                       '$no_auto_update'           => ['no_auto_update'          , DI::l10n()->t('Automatic updates only at the top of the network page'), $no_auto_update, DI::l10n()->t('When disabled, the network page is updated all the time, which could be confusing while reading.')],
+                       '$no_auto_update'           => ['no_auto_update'          , DI::l10n()->t('Automatic updates only at the top of the post stream pages'), $no_auto_update, DI::l10n()->t('Auto update may add new posts at the top of the post stream pages, which can affect the scroll position and perturb normal reading if it happens anywhere else the top of the page.')],
                        '$nosmile'                      => ['nosmile'                 , DI::l10n()->t('Don\'t show emoticons'), $nosmile, DI::l10n()->t('Normally emoticons are replaced with matching symbols. This setting disables this behaviour.')],
                        '$infinite_scroll'          => ['infinite_scroll'         , DI::l10n()->t('Infinite scroll'), $infinite_scroll, DI::l10n()->t('Automatic fetch new items when reaching the page end.')],
                        '$no_smart_threading'       => ['no_smart_threading'      , DI::l10n()->t('Disable Smart Threading'), $no_smart_threading, DI::l10n()->t('Disable the automatic suppression of extraneous thread indentation.')],
+                       '$hide_dislike'             => ['hide_dislike'            , DI::l10n()->t('Hide the Dislike feature'), $hide_dislike, DI::l10n()->t('Hides the Dislike button and dislike reactions on posts and comments.')],
 
                        '$first_day_of_week' => ['first_day_of_week', DI::l10n()->t('Beginning of week:'), $first_day_of_week, '', $weekdays, false],
                ]);