X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=e8e70c0e11cf097fee20a05757e92f4e75674be2;hb=71b6226909aaef47ae4cfa7ba3d880cb0a73e2ef;hp=90974427965538d5425637361e7c437a21bad759;hpb=5254147ccc18417f0b16ec4d8b8325d7790b4fde;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index 9097442796..e8e70c0e11 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -1,27 +1,41 @@ . + * */ + namespace Friendica\Content; use Friendica\Core\Addon; -use Friendica\Core\Config; -use Friendica\Core\L10n; -use Friendica\Core\PConfig; use Friendica\Core\Protocol; use Friendica\Core\Renderer; -use Friendica\Core\System; +use Friendica\Core\Session; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\FileTag; use Friendica\Model\GContact; +use Friendica\Model\Group; use Friendica\Model\Item; use Friendica\Model\Profile; use Friendica\Util\DateTimeFormat; -use Friendica\Util\Proxy as ProxyUtils; use Friendica\Util\Strings; use Friendica\Util\Temporal; -use Friendica\Util\XML; class Widget { @@ -35,11 +49,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') )); } @@ -48,31 +62,30 @@ class Widget */ public static function findPeople() { - $a = \get_app(); - $global_dir = Config::get('system', 'directory'); + $global_dir = DI::config()->get('system', 'directory'); - if (Config::get('system', 'invitation_only')) { - $x = intval(PConfig::get(local_user(), 'system', 'invites_remaining')); + if (DI::config()->get('system', 'invitation_only')) { + $x = intval(DI::pConfig()->get(local_user(), 'system', 'invites_remaining')); if ($x || is_site_admin()) { - $a->page['aside'] .= '