diff options
author | Joas Schilling <coding@schilljs.com> | 2016-12-01 11:35:23 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-12-01 11:35:23 +0100 |
commit | b2f46bfa04fdd6f205fba1a5d4011a9e5c5637dd (patch) | |
tree | 17ac8c13c32c6cfc8ceafdf1afba948870561fba /apps/files | |
parent | 23a525a74b38b729eed2dad90d0f6bf41d95216c (diff) | |
download | nextcloud-server-b2f46bfa04fdd6f205fba1a5d4011a9e5c5637dd.tar.gz nextcloud-server-b2f46bfa04fdd6f205fba1a5d4011a9e5c5637dd.zip |
Adjust all implementations in the server repo
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/lib/Activity/Provider.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php index 863e7644059..92686ec0c36 100644 --- a/apps/files/lib/Activity/Provider.php +++ b/apps/files/lib/Activity/Provider.php @@ -29,9 +29,13 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; class Provider implements IProvider { + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -51,14 +55,14 @@ class Provider implements IProvider { protected $displayNames = []; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager * @param IEventMerger $eventMerger */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->userManager = $userManager; @@ -66,17 +70,20 @@ class Provider implements IProvider { } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'files') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('files', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event, $previousEvent); |