Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-08-08 10:32:55 +0300
committerGitHub <noreply@github.com>2022-08-08 10:32:55 +0300
commit3b9efba8abc8d05661e4252b0fee62cda52448bb (patch)
tree9ff6bcd671422dea8153ac336274667f31f6a930
parentaf36323e53cf95f4a0829354a9ec732afeaec932 (diff)
parentf10e1a21fe8eecf10c7c2649ecf3773fa8f08fa5 (diff)
Merge pull request #3961 from nextcloud/backport/3952/stable22
-rw-r--r--lib/Service/ConfigService.php4
-rw-r--r--lib/Sharing/Listener.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php
index cca6265b..5aca2222 100644
--- a/lib/Service/ConfigService.php
+++ b/lib/Service/ConfigService.php
@@ -169,11 +169,11 @@ class ConfigService {
return array_filter($groups);
}
- public function getAttachmentFolder(): string {
+ public function getAttachmentFolder(string $userId = null): string {
if ($this->getUserId() === null) {
throw new NoPermissionException('Must be logged in get the attachment folder');
}
- return $this->config->getUserValue($this->getUserId(), 'deck', 'attachment_folder', '/Deck');
+ return $this->config->getUserValue($userId ?? $this->getUserId(), 'deck', 'attachment_folder', '/Deck');
}
}
diff --git a/lib/Sharing/Listener.php b/lib/Sharing/Listener.php
index 8fa954fc..49e1651e 100644
--- a/lib/Sharing/Listener.php
+++ b/lib/Sharing/Listener.php
@@ -102,7 +102,7 @@ class Listener {
}
}
- $parent = $this->configService->getAttachmentFolder();
+ $parent = $this->configService->getAttachmentFolder($userId);
$event->setParent($parent);
if (!$event->getView()->is_dir($parent)) {
$event->getView()->mkdir($parent);