X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdfrn_poll.php;h=3e193e2a3a579390f49b84cdf4febc2d91b40520;hb=6e2880c6799e5c98e41ea40e1bdbac7bfe6ae326;hp=0641b9177b4d20030ddaf19c8209060efb2eb6c3;hpb=f00068051195baad74d1cca13b7f81a7dbdc4467;p=friendica.git diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 0641b9177b..3e193e2a3a 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -5,14 +5,13 @@ */ use Friendica\App; -use Friendica\BaseObject; -use Friendica\App\Authentication; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Core\System; use Friendica\Core\Session; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Module\Security\Login; use Friendica\Protocol\DFRN; use Friendica\Protocol\OStatus; @@ -22,9 +21,7 @@ use Friendica\Util\XML; function dfrn_poll_init(App $a) { - /** @var Authentication $authentication */ - $authentication = BaseObject::getClass(Authentication::class); - $authentication->withSession($a); + DI::auth()->withSession($a); $dfrn_id = $_GET['dfrn_id'] ?? ''; $type = ($_GET['type'] ?? '') ?: 'data'; @@ -94,7 +91,7 @@ function dfrn_poll_init(App $a) $my_id = '0:' . $dfrn_id; break; default: - $a->internalRedirect(); + DI::baseUrl()->redirect(); break; // NOTREACHED } @@ -141,10 +138,10 @@ function dfrn_poll_init(App $a) if (!empty($destination_url)) { System::externalRedirect($destination_url); } else { - $a->internalRedirect('profile/' . $profile); + DI::baseUrl()->redirect('profile/' . $profile); } } - $a->internalRedirect(); + DI::baseUrl()->redirect(); } if ($type === 'profile-check' && $dfrn_version < 2.2) { @@ -328,7 +325,7 @@ function dfrn_poll_post(App $a) $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", DBA::escape($dfrn_id)); break; default: - $a->internalRedirect(); + DI::baseUrl()->redirect(); break; // NOTREACHED } @@ -448,7 +445,7 @@ function dfrn_poll_content(App $a) $my_id = '0:' . $dfrn_id; break; default: - $a->internalRedirect(); + DI::baseUrl()->redirect(); break; // NOTREACHED } @@ -544,18 +541,18 @@ function dfrn_poll_content(App $a) switch ($destination_url) { case 'profile': - $a->internalRedirect('profile/' . $profile . '?f=&tab=profile'); + DI::baseUrl()->redirect('profile/' . $profile . '?tab=profile'); break; case 'photos': - $a->internalRedirect('photos/' . $profile); + DI::baseUrl()->redirect('photos/' . $profile); break; case 'status': case '': - $a->internalRedirect('profile/' . $profile); + DI::baseUrl()->redirect('profile/' . $profile); break; default: - $appendix = (strstr($destination_url, '?') ? '&f=&redir=1' : '?f=&redir=1'); - $a->redirect($destination_url . $appendix); + $appendix = (strstr($destination_url, '?') ? '&redir=1' : '?redir=1'); + DI::baseUrl()->redirect($destination_url . $appendix); break; } // NOTREACHED