]> git.mxchange.org Git - friendica.git/blob - src/Module/Search/Directory.php
wrapping up 2019.12
[friendica.git] / src / Module / Search / Directory.php
1 <?php
2
3 namespace Friendica\Module\Search;
4
5 use Friendica\Content\Widget;
6 use Friendica\Core\L10n;
7 use Friendica\Module\BaseSearchModule;
8 use Friendica\Module\Login;
9 use Friendica\Util\Strings;
10
11 /**
12  * Directory search module
13  */
14 class Directory extends BaseSearchModule
15 {
16         public static function content(array $parameters = [])
17         {
18                 if (!local_user()) {
19                         notice(L10n::t('Permission denied.'));
20                         return Login::form();
21                 }
22
23                 $search = Strings::escapeTags(trim(rawurldecode($_REQUEST['search'] ?? '')));
24
25                 $a = self::getApp();
26
27                 if (empty($a->page['aside'])) {
28                         $a->page['aside'] = '';
29                 }
30
31                 $a->page['aside'] .= Widget::findPeople();
32                 $a->page['aside'] .= Widget::follow();
33
34                 return self::performSearch($search);
35         }
36 }