From: Michael Date: Fri, 5 Jan 2018 20:11:35 +0000 (+0000) Subject: Don't show the local community page on single user instances X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5290b1404b46b523e7a028b218648d838813f1ff;p=friendica.git Don't show the local community page on single user instances --- diff --git a/mod/community.php b/mod/community.php index 781f31302c..7c480d259e 100644 --- a/mod/community.php +++ b/mod/community.php @@ -27,8 +27,13 @@ function community_content(App $a, $update = 0) if ($a->argc > 1) { $content = $a->argv[1]; } else { - // When only the global community is allowed, we use this as default - $content = $page_style == CP_GLOBAL_COMMUNITY ? 'global' : 'local'; + if (!empty(Config::get('system','singleuser'))) { + // On single user systems only the global page does make sense + $content = 'global'; + } else { + // When only the global community is allowed, we use this as default + $content = $page_style == CP_GLOBAL_COMMUNITY ? 'global' : 'local'; + } } if (!in_array($content, ['local', 'global'])) { @@ -61,7 +66,7 @@ function community_content(App $a, $update = 0) if (!$update) { $tabs = []; - if (local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) { + if ((local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) && empty(Config::get('system','singleuser'))) { $tabs[] = array( 'label' => t('Community'), 'url' => 'community/local',