use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\Database\DBA;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\Database\DBA;
- if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
- notice(L10n::t('Public access denied.') . EOL);
+ if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
+ notice(DI::l10n()->t('Public access denied.') . EOL);
- if ((local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) && empty(Config::get('system', 'singleuser'))) {
+ if ((local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) && empty(DI::config()->get('system', 'singleuser'))) {
'url' => 'community/local',
'sel' => $content == 'local' ? 'active' : '',
'url' => 'community/local',
'sel' => $content == 'local' ? 'active' : '',
'url' => 'community/global',
'sel' => $content == 'global' ? 'active' : '',
'url' => 'community/global',
'sel' => $content == 'global' ? 'active' : '',
'default_location' => $a->user['default-location'],
'nickname' => $a->user['nickname'],
'lockstate' => (is_array($a->user) && (strlen($a->user['allow_cid']) || strlen($a->user['allow_gid']) || strlen($a->user['deny_cid']) || strlen($a->user['deny_gid'])) ? 'lock' : 'unlock'),
'default_location' => $a->user['default-location'],
'nickname' => $a->user['nickname'],
'lockstate' => (is_array($a->user) && (strlen($a->user['allow_cid']) || strlen($a->user['allow_gid']) || strlen($a->user['deny_cid']) || strlen($a->user['deny_gid'])) ? 'lock' : 'unlock'),
- 'acl' => ACL::getFullSelectorHTML($a->page, $a->user, true),
+ 'acl' => ACL::getFullSelectorHTML(DI::page(), $a->user, true),
- if ($a->is_mobile) {
- $itemspage_network = PConfig::get(local_user(), 'system', 'itemspage_mobile_network', 20);
+ if (DI::mode()->isMobile()) {
+ $itemspage_network = DI::pConfig()->get(local_user(), 'system', 'itemspage_mobile_network', 20);
- $itemspage_network = PConfig::get(local_user(), 'system', 'itemspage_network', 40);
+ $itemspage_network = DI::pConfig()->get(local_user(), 'system', 'itemspage_network', 40);
$r = community_getitems($pager->getStart(), $pager->getItemsPerPage(), $content, $accounttype);
if (!DBA::isResult($r)) {
$r = community_getitems($pager->getStart(), $pager->getItemsPerPage(), $content, $accounttype);
if (!DBA::isResult($r)) {
}
$t = Renderer::getMarkupTemplate("community.tpl");
return Renderer::replaceMacros($t, [
'$content' => $o,
'$header' => '',
}
$t = Renderer::getMarkupTemplate("community.tpl");
return Renderer::replaceMacros($t, [
'$content' => $o,
'$header' => '',
- '$show_global_community_hint' => ($content == 'global') && Config::get('system', 'show_global_community_hint'),
- '$global_community_hint' => L10n::t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.")
+ '$show_global_community_hint' => ($content == 'global') && DI::config()->get('system', 'show_global_community_hint'),
+ '$global_community_hint' => DI::l10n()->t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.")