X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FNotifications%2FIntroductions.php;h=246bed54029d54f616e633de48d1ecc721a18aca;hb=f0743e4e128dfcb5d6305f4ed09e969573ba6b15;hp=b9bbd0be93159677cd2d1a10ecdbe39cb60fdb9d;hpb=dab9e13c69ee0fe6cb4cdaed06510ca938c747ae;p=friendica.git diff --git a/src/Module/Notifications/Introductions.php b/src/Module/Notifications/Introductions.php index b9bbd0be93..246bed5402 100644 --- a/src/Module/Notifications/Introductions.php +++ b/src/Module/Notifications/Introductions.php @@ -1,6 +1,6 @@ notificationIntro = $notificationIntro; $this->mode = $mode; @@ -71,7 +77,7 @@ class Introductions extends BaseNotifications ]; } - public function content(): string + protected function content(array $request = []): string { Nav::setSelected('introductions'); @@ -93,8 +99,8 @@ class Introductions extends BaseNotifications 'text' => (!$all ? $this->t('Show Ignored Requests') : $this->t('Hide Ignored Requests')), ]; - $owner = User::getOwnerDataById(local_user()); - + $owner = User::getOwnerDataById(DI::userSession()->getLocalUserId()); + // Loop through all introduction notifications.This creates an array with the output html for each // introduction /** @var Introduction $Introduction */ @@ -122,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'), @@ -146,7 +152,7 @@ class Introductions extends BaseNotifications $helptext = $this->t('Shall your connection be bidirectional or not?'); $helptext2 = $this->t('Accepting %s as a friend allows %s to subscribe to your posts, and you will also receive updates from them in your news feed.', $convertedName, $convertedName); $helptext3 = $this->t('Accepting %s as a subscriber allows them to subscribe to your posts, but you will not receive updates from them in your news feed.', $convertedName); - + $friend = ['duplex', $this->t('Friend'), '1', $helptext2, true]; $follower = ['duplex', $this->t('Subscriber'), '0', $helptext3, false]; @@ -207,7 +213,7 @@ class Introductions extends BaseNotifications } if (count($notifications['notifications']) == 0) { - notice($this->t('No introductions.')); + DI::sysmsg()->addNotice($this->t('No introductions.')); $notificationNoContent = $this->t('No more %s notifications.', $notifications['ident']); }