X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=86339928702dadadd879f02e1dbef365d6785d8d;hb=30dcf3380c8c06b2b8b2583e38282857fec41b3c;hp=3c3af4f6ac37f225422fae4067bf7d57184f102b;hpb=3282ce53894b624893ee2989747a59866ab4b137;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index 3c3af4f6ac..8633992870 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -1,26 +1,38 @@ . + * */ + namespace Friendica\Content; -use Friendica\Content\ContactSelector; -use Friendica\Content\Feature; 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 { @@ -33,12 +45,12 @@ class Widget */ public static function follow($value = "") { - return Renderer::replaceMacros(Renderer::getMarkupTemplate('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'), + return Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/follow.tpl'), array( + '$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') )); } @@ -47,45 +59,50 @@ 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'] .= '