]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/AllFriends.php
Merge pull request #8048 from MrPetovan/bug/fix-bbcode-scaleexternalimage
[friendica.git] / src / Module / AllFriends.php
index 76453a02c3574d543b94e798feea7f02df950ed6..e145614982274a50d4741c29ba4ba5d96e5ed5a8 100644 (file)
@@ -7,6 +7,7 @@ use Friendica\Content\ContactSelector;
 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;
@@ -16,9 +17,9 @@ 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();
@@ -43,12 +44,12 @@ class AllFriends extends BaseModule
                        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)) {
@@ -69,7 +70,7 @@ 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]