X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsuggest.php;h=5fb9bdcff782756524b90d5caa76675e31585cc7;hb=010ec99b35c2bee8f23060e96c2af3ba5849cf84;hp=4b67dd6eb8e7930b6d217c7dc46024d55707956f;hpb=e17db489eee549f47c39c9b5494063476ed4aeb0;p=friendica.git diff --git a/mod/suggest.php b/mod/suggest.php index 4b67dd6eb8..5fb9bdcff7 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -1,15 +1,30 @@ . + * */ use Friendica\App; use Friendica\Content\ContactSelector; use Friendica\Content\Widget; -use Friendica\Core\L10n; use Friendica\Core\Renderer; -use Friendica\Core\System; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\GContact; use Friendica\Util\Proxy as ProxyUtils; @@ -25,10 +40,10 @@ function suggest_post(App $a) { if (!empty($_POST['ignore']) && !empty($_POST['confirm'])) { DBA::insert('gcign', ['uid' => local_user(), 'gcid' => $_POST['ignore']]); - notice(L10n::t('Contact suggestion successfully ignored.')); + notice(DI::l10n()->t('Contact suggestion successfully ignored.')); } - $a->internalRedirect('suggest'); + DI::baseUrl()->redirect('suggest'); } function suggest_content(App $a) @@ -36,20 +51,20 @@ function suggest_content(App $a) $o = ''; if (! local_user()) { - notice(L10n::t('Permission denied.') . EOL); + notice(DI::l10n()->t('Permission denied.') . EOL); return; } - $_SESSION['return_path'] = $a->cmd; + $_SESSION['return_path'] = DI::args()->getCommand(); - $a->page['aside'] .= Widget::findPeople(); - $a->page['aside'] .= Widget::follow(); + DI::page()['aside'] .= Widget::findPeople(); + DI::page()['aside'] .= Widget::follow(); $r = GContact::suggestionQuery(local_user()); if (! DBA::isResult($r)) { - $o .= L10n::t('No suggestions available. If this is a new site, please try again in 24 hours.'); + $o .= DI::l10n()->t('No suggestions available. If this is a new site, please try again in 24 hours.'); return $o; } @@ -57,7 +72,7 @@ function suggest_content(App $a) if (!empty($_GET['ignore'])) { //