X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsuggest.php;h=adf41c0c60c6cadd501d0500409ef331a5f52ba6;hb=622b978a8444624b36b01853239a2959cb4a1bf5;hp=244427e986b2b7ad262e7179ee78b510289e7c94;hpb=cc85bc41560e937e070cf37ec295a4060a6e02d4;p=friendica.git diff --git a/mod/suggest.php b/mod/suggest.php index 244427e986..adf41c0c60 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -1,6 +1,6 @@ local_user(), 'gcid' => $_POST['ignore']]); - notice(DI::l10n()->t('Contact suggestion successfully ignored.')); - } - - DI::baseUrl()->redirect('suggest'); -} +use Friendica\Module\Contact as ModuleContact; +use Friendica\Network\HTTPException; function suggest_content(App $a) { - $o = ''; - - if (! local_user()) { - notice(DI::l10n()->t('Permission denied.')); - return; + if (!local_user()) { + throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.')); } $_SESSION['return_path'] = DI::args()->getCommand(); @@ -59,64 +39,20 @@ function suggest_content(App $a) DI::page()['aside'] .= Widget::findPeople(); DI::page()['aside'] .= Widget::follow(); - - $contacts = Contact::getSuggestions(local_user()); + $contacts = Contact\Relation::getSuggestions(local_user()); if (!DBA::isResult($contacts)) { - $o .= DI::l10n()->t('No suggestions available. If this is a new site, please try again in 24 hours.'); - return $o; - } - - - if (!empty($_GET['ignore'])) { - //