friendica-github/src/Module/Search/Directory.php

37 lines
717 B
PHP
Raw Normal View History

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