X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=f4a9fbe1f1b33eddf02422c16b8270e2c367fd80;hb=122ad0af14f046c2462a03fe33967dc41abfc8b5;hp=5878bc75d22f7e88a73708d6920215bbb58c647a;hpb=ca5caa69f349ee572151166e109a0226715a7cb6;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index 5878bc75d2..f4a9fbe1f1 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -1,28 +1,37 @@ . + * */ + 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 { @@ -36,11 +45,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') )); } @@ -49,31 +58,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'] .= '