friendica-github/src/Module/Search/Directory.php
nupplaPhil 1de3f186d7
Introduce new DI container
- Adding Friendica\DI class for getting dynamic classes
- Replacing BaseObject::getApp() with this class
2019-12-29 20:16:55 +01:00

37 lines
757 B
PHP

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