X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=86339928702dadadd879f02e1dbef365d6785d8d;hb=30dcf3380c8c06b2b8b2583e38282857fec41b3c;hp=e89245cd2bc40b0c4ed012fc6595159dde61c827;hpb=e6742af65c328a20fba346aa0fea4ffafaac52d1;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index e89245cd2b..8633992870 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -1,24 +1,38 @@ . + * */ + namespace Friendica\Content; use Friendica\Core\Addon; -use Friendica\Core\Config; -use Friendica\Core\L10n; -use Friendica\Core\PConfig; +use Friendica\Core\Cache\Enum\Duration; use Friendica\Core\Protocol; use Friendica\Core\Renderer; -use Friendica\Core\System; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\FileTag; -use Friendica\Model\GContact; -use Friendica\Model\Profile; -use Friendica\Util\Proxy as ProxyUtils; -use Friendica\Util\Strings; -use Friendica\Util\XML; +use Friendica\Model\Group; +use Friendica\Model\Item; +use Friendica\Model\Post; +use Friendica\Util\DateTimeFormat; +use Friendica\Util\Temporal; class Widget { @@ -32,11 +46,11 @@ class Widget public static function follow($value = "") { return Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/follow.tpl'), array( - '$connect' => L10n::t('Add New Contact'), - '$desc' => L10n::t('Enter address or web location'), - '$hint' => L10n::t('Example: bob@example.com, http://example.com/barbara'), + '$connect' => DI::l10n()->t('Add New Contact'), + '$desc' => DI::l10n()->t('Enter address or web location'), + '$hint' => DI::l10n()->t('Example: bob@example.com, http://example.com/barbara'), '$value' => $value, - '$follow' => L10n::t('Connect') + '$follow' => DI::l10n()->t('Connect') )); } @@ -45,31 +59,30 @@ class Widget */ public static function findPeople() { - $a = \get_app(); - $global_dir = Config::get('system', 'directory'); - - if (Config::get('system', 'invitation_only')) { - $x = PConfig::get(local_user(), 'system', 'invites_remaining'); - if ($x || is_site_admin()) { - $a->page['aside'] .= '