]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Notifications/Introductions.php
Merge pull request #12143 from MrPetovan/bug/moderation
[friendica.git] / src / Module / Notifications / Introductions.php
index 776c146dec79a5e21d21badfeeaa009b8016c767..f8a63e7208ccef0f1aeb0b912391667b475d367b 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Content\Text\BBCode;
 use Friendica\Core\L10n;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
-use Friendica\Core\Session;
+use Friendica\Core\Session\Capability\IHandleUserSessions;
 use Friendica\DI;
 use Friendica\Model\User;
 use Friendica\Module\BaseNotifications;
@@ -50,9 +50,9 @@ class Introductions extends BaseNotifications
        /** @var Mode */
        protected $mode;
 
-       public function __construct(L10n $l10n, App\BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Mode $mode, IntroductionFactory $notificationIntro, array $server, array $parameters = [])
+       public function __construct(L10n $l10n, App\BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Mode $mode, IntroductionFactory $notificationIntro, IHandleUserSessions $userSession, array $server, array $parameters = [])
        {
-               parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
+               parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $userSession, $server, $parameters);
 
                $this->notificationIntro = $notificationIntro;
                $this->mode              = $mode;
@@ -99,7 +99,7 @@ class Introductions extends BaseNotifications
                        'text' => (!$all ? $this->t('Show Ignored Requests') : $this->t('Hide Ignored Requests')),
                ];
 
-               $owner = User::getOwnerDataById(Session::getLocalUser());
+               $owner = User::getOwnerDataById(DI::userSession()->getLocalUserId());
        
                // Loop through all introduction notifications.This creates an array with the output html for each
                // introduction
@@ -128,7 +128,7 @@ class Introductions extends BaseNotifications
                                                '$zrl'                   => $Introduction->getZrl(),
                                                '$lbl_url'               => $this->t('Profile URL'),
                                                '$addr'                  => $Introduction->getAddr(),
-                                               '$action'                => 'follow',
+                                               '$action'                => 'contact/follow',
                                                '$approve'               => $this->t('Approve'),
                                                '$note'                  => $Introduction->getNote(),
                                                '$ignore'                => $this->t('Ignore'),