<?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
*
use Friendica\Model;
use Friendica\Model\Profile;
use Friendica\Network\HTTPException;
-use Friendica\Util\Strings;
/**
* Shows the local directory of this node
*/
class Directory extends BaseModule
{
- public static function content(array $parameters = [])
+ protected function content(array $request = []): string
{
$app = DI::app();
$config = DI::config();
Nav::setSelected('directory');
- $search = (!empty($_REQUEST['search']) ?
- Strings::escapeTags(trim(rawurldecode($_REQUEST['search']))) :
- '');
+ $search = trim(rawurldecode($_REQUEST['search'] ?? ''));
$gDirPath = '';
$dirURL = $config->get('system', 'directory');
'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'],