]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Directory.php
Merge pull request #11503 from annando/bulk-delivery
[friendica.git] / src / Module / Directory.php
index 0172612d51f0346c0a6f3a81d6ba06f39760aef3..b79e7b1495a3c89ac99b60f2e26a6b4938499ed3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -28,6 +28,7 @@ use Friendica\Content\Widget;
 use Friendica\Core\Hook;
 use Friendica\Core\Session;
 use Friendica\Core\Renderer;
+use Friendica\Core\Search;
 use Friendica\DI;
 use Friendica\Model;
 use Friendica\Model\Profile;
@@ -38,7 +39,7 @@ use Friendica\Network\HTTPException;
  */
 class Directory extends BaseModule
 {
-       public static function content(array $parameters = [])
+       protected function content(array $request = []): string
        {
                $app = DI::app();
                $config = DI::config();
@@ -61,7 +62,7 @@ class Directory extends BaseModule
                $search = trim(rawurldecode($_REQUEST['search'] ?? ''));
 
                $gDirPath = '';
-               $dirURL = $config->get('system', 'directory');
+               $dirURL = Search::getGlobalDirectory();
                if (strlen($dirURL)) {
                        $gDirPath = Profile::zrl($dirURL, true);
                }
@@ -165,7 +166,7 @@ class Directory extends BaseModule
                        'img_hover'    => $contact['name'],
                        'name'         => $contact['name'],
                        'details'      => $details,
-                       'account_type' => Model\Contact::getAccountType($contact),
+                       'account_type' => Model\Contact::getAccountType($contact['contact-type']),
                        'profile'      => $profile,
                        'location'     => $location_e,
                        'tags'         => $contact['pub_keywords'],