X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FAllFriends.php;h=662dc17e4c24c047402f27b8773b9b7b879b80e2;hb=92692218255145124fb553d6b61d1d9fed27da19;hp=26999907363644ee2a8f998b3350ab2352c00fb8;hpb=1de3f186d79f3703850524c1d58c237be3eb25f3;p=friendica.git diff --git a/src/Module/AllFriends.php b/src/Module/AllFriends.php index 2699990736..662dc17e4c 100644 --- a/src/Module/AllFriends.php +++ b/src/Module/AllFriends.php @@ -5,7 +5,6 @@ namespace Friendica\Module; use Friendica\BaseModule; use Friendica\Content\ContactSelector; use Friendica\Content\Pager; -use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Model; @@ -33,7 +32,7 @@ class AllFriends extends BaseModule } if (!$cid) { - throw new HTTPException\BadRequestException(L10n::t('Invalid contact.')); + throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid contact.')); } $uid = $app->user['uid']; @@ -41,19 +40,19 @@ class AllFriends extends BaseModule $contact = Model\Contact::getContactForUser($cid, local_user(), ['name', 'url', 'photo', 'uid', 'id']); if (empty($contact)) { - throw new HTTPException\BadRequestException(L10n::t('Invalid contact.')); + throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid contact.')); } - $app->page['aside'] = ""; + DI::page()['aside'] = ""; Model\Profile::load($app, "", 0, Model\Contact::getDetailsByURL($contact["url"])); $total = Model\GContact::countAllFriends(local_user(), $cid); - $pager = new Pager($app->query_string); + $pager = new Pager(DI::args()->getQueryString()); $friends = Model\GContact::allFriends(local_user(), $cid, $pager->getStart(), $pager->getItemsPerPage()); if (empty($friends)) { - return L10n::t('No friends to display.'); + return DI::l10n()->t('No friends to display.'); } $id = 0; @@ -70,10 +69,10 @@ class AllFriends extends BaseModule $friend['id'] = $friend['cid']; $photoMenu = Model\Contact::photoMenu($friend); } else { - $connlnk = $app->getBaseURL() . '/follow/?url=' . $friend['url']; + $connlnk = DI::baseUrl()->get() . '/follow/?url=' . $friend['url']; $photoMenu = [ - 'profile' => [L10n::t('View Profile'), Model\Contact::magicLinkbyId($friend['id'], $friend['url'])], - 'follow' => [L10n::t('Connect/Follow'), $connlnk] + 'profile' => [DI::l10n()->t('View Profile'), Model\Contact::magicLinkbyId($friend['id'], $friend['url'])], + 'follow' => [DI::l10n()->t('Connect/Follow'), $connlnk] ]; } @@ -89,7 +88,7 @@ class AllFriends extends BaseModule 'account_type' => Model\Contact::getAccountType($contactDetails), 'network' => ContactSelector::networkToName($contactDetails['network'], $contactDetails['url']), 'photoMenu' => $photoMenu, - 'conntxt' => L10n::t('Connect'), + 'conntxt' => DI::l10n()->t('Connect'), 'connlnk' => $connlnk, 'id' => ++$id, ];