. * */ use Friendica\App; use Friendica\Content\ContactSelector; use Friendica\Content\Widget; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\GContact; function suggest_init(App $a) { if (! local_user()) { return; } } function suggest_post(App $a) { if (!empty($_POST['ignore']) && !empty($_POST['confirm'])) { DBA::insert('gcign', ['uid' => local_user(), 'gcid' => $_POST['ignore']]); notice(DI::l10n()->t('Contact suggestion successfully ignored.')); } DI::baseUrl()->redirect('suggest'); } function suggest_content(App $a) { $o = ''; if (! local_user()) { notice(DI::l10n()->t('Permission denied.')); return; } $_SESSION['return_path'] = DI::args()->getCommand(); DI::page()['aside'] .= Widget::findPeople(); DI::page()['aside'] .= Widget::follow(); $contacts = Contact::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'])) { //