diff options
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/lib/Activity/GroupProvider.php | 13 | ||||
-rw-r--r-- | apps/settings/lib/Activity/Provider.php | 13 |
2 files changed, 2 insertions, 24 deletions
diff --git a/apps/settings/lib/Activity/GroupProvider.php b/apps/settings/lib/Activity/GroupProvider.php index 466bb9abeee..52798d2e428 100644 --- a/apps/settings/lib/Activity/GroupProvider.php +++ b/apps/settings/lib/Activity/GroupProvider.php @@ -30,7 +30,6 @@ use OCP\Activity\IProvider; use OCP\IGroup; use OCP\IGroupManager; use OCP\IURLGenerator; -use OCP\IUser; use OCP\IUserManager; use OCP\L10N\IFactory as L10nFactory; @@ -123,20 +122,10 @@ class GroupProvider implements IProvider { } /** - * @param IEvent $event - * @param string $subject - * @param array $parameters * @throws \InvalidArgumentException */ protected function setSubjects(IEvent $event, string $subject, array $parameters): void { - $placeholders = $replacements = []; - foreach ($parameters as $placeholder => $parameter) { - $placeholders[] = '{' . $placeholder . '}'; - $replacements[] = $parameter['name']; - } - - $event->setParsedSubject(str_replace($placeholders, $replacements, $subject)) - ->setRichSubject($subject, $parameters); + $event->setRichSubject($subject, $parameters); } /** diff --git a/apps/settings/lib/Activity/Provider.php b/apps/settings/lib/Activity/Provider.php index 7d8a7f0da9a..85ebd3e2abd 100644 --- a/apps/settings/lib/Activity/Provider.php +++ b/apps/settings/lib/Activity/Provider.php @@ -33,7 +33,6 @@ use OCP\Activity\IManager; use OCP\Activity\IProvider; use OCP\IL10N; use OCP\IURLGenerator; -use OCP\IUser; use OCP\IUserManager; use OCP\L10N\IFactory; @@ -186,20 +185,10 @@ class Provider implements IProvider { } /** - * @param IEvent $event - * @param string $subject - * @param array $parameters * @throws \InvalidArgumentException */ protected function setSubjects(IEvent $event, string $subject, array $parameters): void { - $placeholders = $replacements = []; - foreach ($parameters as $placeholder => $parameter) { - $placeholders[] = '{' . $placeholder . '}'; - $replacements[] = $parameter['name']; - } - - $event->setParsedSubject(str_replace($placeholders, $replacements, $subject)) - ->setRichSubject($subject, $parameters); + $event->setRichSubject($subject, $parameters); } protected function generateUserParameter(string $uid): array { |