use Friendica\Content\Pager;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
+use Friendica\DI;
use Friendica\Model;
use Friendica\Network\HTTPException;
use Friendica\Util\Proxy as ProxyUtils;
*/
class AllFriends extends BaseModule
{
- public static function content($parameters)
+ public static function content(array $parameters = [])
{
- $app = self::getApp();
+ $app = DI::app();
if (!local_user()) {
throw new HTTPException\ForbiddenException();
throw new HTTPException\BadRequestException(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)) {
$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]