diff --git a/mod/suggest.php b/mod/suggest.php deleted file mode 100644 index 41fa1b06b..000000000 --- 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, - ]); -}