X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsuggest.php;h=c18de1bd3dc46ea26db8c113ca225afd25629946;hb=85e36abb5f4acf3de263db80f301c5c63e00c62a;hp=9cd2fb1cd9b625fa015ff2a2bf2c44f5ab4e9267;hpb=b8682190de8bce2cebb80635a2fa03482d37eeae;p=friendica.git diff --git a/mod/suggest.php b/mod/suggest.php index 9cd2fb1cd9..c18de1bd3d 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.') . EOL); - return; + if (!local_user()) { + throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.')); } $_SESSION['return_path'] = DI::args()->getCommand(); @@ -60,80 +39,20 @@ function suggest_content(App $a) DI::page()['aside'] .= Widget::findPeople(); DI::page()['aside'] .= Widget::follow(); - - $r = GContact::suggestionQuery(local_user()); - - if (! DBA::isResult($r)) { - $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'])) { - //