aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-07-16 18:23:12 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-07-17 21:16:39 +0000
commit06487a5da677b61f82935dae5dd1beba72133772 (patch)
tree08cd7303da12471f9995c278397ea909b508c779
parent04038439433e7399ec3fac21eb095736290b949d (diff)
downloadnextcloud-server-backport/53979/stable30.tar.gz
nextcloud-server-backport/53979/stable30.zip
fix(files_sharing): ensure share folder exists in the settingsbackport/53979/stable30
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--apps/files_sharing/lib/Settings/Personal.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/Settings/Personal.php b/apps/files_sharing/lib/Settings/Personal.php
index 4f7ca05d3ad..c72ca9159f2 100644
--- a/apps/files_sharing/lib/Settings/Personal.php
+++ b/apps/files_sharing/lib/Settings/Personal.php
@@ -9,6 +9,7 @@ declare(strict_types=1);
namespace OCA\Files_Sharing\Settings;
use OCA\Files_Sharing\AppInfo\Application;
+use OCA\Files_Sharing\Helper;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\IConfig;
@@ -31,16 +32,18 @@ class Personal implements ISettings {
public function getForm(): TemplateResponse {
$defaultAcceptSystemConfig = $this->config->getSystemValueBool('sharing.enable_share_accept', false) ? 'no' : 'yes';
- $shareFolderSystemConfig = $this->config->getSystemValue('share_folder', '/');
+ $defaultShareFolder = $this->config->getSystemValue('share_folder', '/');
+ $userShareFolder = Helper::getShareFolder(userId: $this->userId);
$acceptDefault = $this->config->getUserValue($this->userId, Application::APP_ID, 'default_accept', $defaultAcceptSystemConfig) === 'yes';
$enforceAccept = $this->config->getSystemValueBool('sharing.force_share_accept', false);
$allowCustomDirectory = $this->config->getSystemValueBool('sharing.allow_custom_share_folder', true);
- $shareFolderDefault = $this->config->getUserValue($this->userId, Application::APP_ID, 'share_folder', $shareFolderSystemConfig);
+
$this->initialState->provideInitialState('accept_default', $acceptDefault);
$this->initialState->provideInitialState('enforce_accept', $enforceAccept);
$this->initialState->provideInitialState('allow_custom_share_folder', $allowCustomDirectory);
- $this->initialState->provideInitialState('share_folder', $shareFolderDefault);
- $this->initialState->provideInitialState('default_share_folder', $shareFolderSystemConfig);
+ $this->initialState->provideInitialState('default_share_folder', $defaultShareFolder);
+ $this->initialState->provideInitialState('share_folder', $userShareFolder);
+
return new TemplateResponse('files_sharing', 'Settings/personal');
}