X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=b9a75e4d2d8c5c1546f246175d55ff3b59171cb5;hb=ddd2c72be8e7245389f97d74dd847f5a20410936;hp=c8c0230c688dd7bafc136127ff05afdf88e92fc4;hpb=8a50101eea4b6794d0f113b7aa6ad51d60cea13d;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index c8c0230c68..b9a75e4d2d 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -1,6 +1,6 @@ get($uid, 'system', 'enabled_timelines', []); + + foreach (DI::NetworkFactory()->getTimelines('') as $channel) { + if (empty($enabled) || in_array($channel->code, $enabled)) { + $channels[] = ['ref' => $channel->code, 'name' => $channel->label]; + } + } + + foreach (DI::ChannelFactory()->getTimelines($uid) as $channel) { + if (empty($enabled) || in_array($channel->code, $enabled)) { + $channels[] = ['ref' => $channel->code, 'name' => $channel->label]; + } + } + + foreach (DI::userDefinedChannel()->selectByUid($uid) as $channel) { + if (empty($enabled) || in_array($channel->code, $enabled)) { + $channels[] = ['ref' => $channel->code, 'name' => $channel->label]; + } + } + + foreach (DI::CommunityFactory()->getTimelines(true) as $community) { + if (empty($enabled) || in_array($community->code, $enabled)) { + $channels[] = ['ref' => $community->code, 'name' => $community->label]; + } + } + + return self::filter( + 'channel', + DI::l10n()->t('Channels'), + '', + '', + $base, + $channels, + $channelname + ); + } }