X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotifications.php;h=e306f0c8a64d2cf86a41d6c719c6112fa6d560d8;hb=af88c2daa34e39cb6430abf64d0648665bfeb9cd;hp=502a2397def8385540e6dfebdc89e0c466fd9adc;hpb=f00068051195baad74d1cca13b7f81a7dbdc4467;p=friendica.git diff --git a/mod/notifications.php b/mod/notifications.php index 502a2397de..e306f0c8a6 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -1,7 +1,7 @@ internalRedirect(); + DI::baseUrl()->redirect(); } $request_id = (($a->argc > 1) ? $a->argv[1] : 0); @@ -30,20 +31,18 @@ function notifications_post(App $a) } if ($request_id) { - /** @var Introduction $Intro */ - $Intro = \Friendica\BaseObject::getClass(Introduction::class); - $Intro->fetch(['id' => $request_id, 'uid' => local_user()]); + $intro = DI::intro()->selectFirst(['id' => $request_id, 'uid' => local_user()]); switch ($_POST['submit']) { case L10n::t('Discard'): - $Intro->discard(); + $intro->discard(); break; case L10n::t('Ignore'): - $Intro->ignore(); + $intro->ignore(); break; } - $a->internalRedirect('notifications/intros'); + DI::baseUrl()->redirect('notifications/intros'); } } @@ -61,8 +60,7 @@ function notifications_content(App $a) $json = (($a->argc > 1 && $a->argv[$a->argc - 1] === 'json') ? true : false); - /** @var Notify $nm */ - $nm = \Friendica\BaseObject::getClass(Notify::class); + $nm = DI::notify(); $o = ''; // Get the nav tabs for the notification pages @@ -112,11 +110,11 @@ function notifications_content(App $a) $notifs = $nm->getHomeList($show, $startrec, $perpage); // fallback - redirect to main page } else { - $a->internalRedirect('notifications'); + DI::baseUrl()->redirect('notifications'); } // Set the pager - $pager = new Pager($a->query_string, $perpage); + $pager = new Pager(DI::args()->getQueryString(), $perpage); // Add additional informations (needed for json output) $notifs['items_page'] = $pager->getItemsPerPage();