friendica/src/Module/Search/Directory.php

35 lines
715 B
PHP
Raw Normal View History

<?php
namespace Friendica\Module\Search;
use Friendica\Content\Widget;
use Friendica\DI;
2020-01-22 23:14:14 -05:00
use Friendica\Module\BaseSearch;
use Friendica\Module\Security\Login;
use Friendica\Util\Strings;
/**
* Directory search module
*/
2020-01-22 23:14:14 -05:00
class Directory extends BaseSearch
{
public static function content(array $parameters = [])
{
if (!local_user()) {
notice(DI::l10n()->t('Permission denied.'));
return Login::form();
}
$search = Strings::escapeTags(trim(rawurldecode($_REQUEST['search'] ?? '')));
if (empty(DI::page()['aside'])) {
DI::page()['aside'] = '';
}
DI::page()['aside'] .= Widget::findPeople();
DI::page()['aside'] .= Widget::follow();
return self::performContactSearch($search);
}
}