From 55744b6ccbc94ca936b27f1daa9c361e528b6a02 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 4 Nov 2022 07:57:37 -0400 Subject: [PATCH] Remove mod/suggest.php file --- mod/suggest.php | 58 ------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 mod/suggest.php diff --git a/mod/suggest.php b/mod/suggest.php deleted file mode 100644 index 41fa1b06b2..0000000000 --- a/mod/suggest.php +++ /dev/null @@ -1,58 +0,0 @@ -. - * - */ - -use Friendica\App; -use Friendica\Content\Widget; -use Friendica\Core\Renderer; -use Friendica\Database\DBA; -use Friendica\DI; -use Friendica\Model\Contact; -use Friendica\Module\Contact as ModuleContact; -use Friendica\Network\HTTPException; - -function suggest_content(App $a) -{ - if (!DI::userSession()->getLocalUserId()) { - throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.')); - } - - $_SESSION['return_path'] = DI::args()->getCommand(); - - DI::page()['aside'] .= Widget::findPeople(); - DI::page()['aside'] .= Widget::follow(); - - $contacts = Contact\Relation::getSuggestions(DI::userSession()->getLocalUserId()); - if (!DBA::isResult($contacts)) { - return DI::l10n()->t('No suggestions available. If this is a new site, please try again in 24 hours.'); - } - - $entries = []; - foreach ($contacts as $contact) { - $entries[] = ModuleContact::getContactTemplateVars($contact); - } - - $tpl = Renderer::getMarkupTemplate('contact/list.tpl'); - - return Renderer::replaceMacros($tpl,[ - '$title' => DI::l10n()->t('Friend Suggestions'), - '$contacts' => $entries, - ]); -}