@@ -17,35 +17,35 @@ |
||
17 | 17 | |
18 | 18 | class Personal implements ISettings { |
19 | 19 | |
20 | - public function __construct( |
|
21 | - private IConfig $config, |
|
22 | - private IInitialState $initialState, |
|
23 | - private string $userId, |
|
24 | - ) { |
|
25 | - } |
|
26 | - |
|
27 | - public function getForm(): TemplateResponse { |
|
28 | - $defaultAcceptSystemConfig = $this->config->getSystemValueBool('sharing.enable_share_accept', false) ? 'no' : 'yes'; |
|
29 | - $defaultShareFolder = $this->config->getSystemValue('share_folder', '/'); |
|
30 | - $userShareFolder = Helper::getShareFolder(userId: $this->userId); |
|
31 | - $acceptDefault = $this->config->getUserValue($this->userId, Application::APP_ID, 'default_accept', $defaultAcceptSystemConfig) === 'yes'; |
|
32 | - $enforceAccept = $this->config->getSystemValueBool('sharing.force_share_accept', false); |
|
33 | - $allowCustomDirectory = $this->config->getSystemValueBool('sharing.allow_custom_share_folder', true); |
|
34 | - |
|
35 | - $this->initialState->provideInitialState('accept_default', $acceptDefault); |
|
36 | - $this->initialState->provideInitialState('enforce_accept', $enforceAccept); |
|
37 | - $this->initialState->provideInitialState('allow_custom_share_folder', $allowCustomDirectory); |
|
38 | - $this->initialState->provideInitialState('default_share_folder', $defaultShareFolder); |
|
39 | - $this->initialState->provideInitialState('share_folder', $userShareFolder); |
|
40 | - |
|
41 | - return new TemplateResponse('files_sharing', 'Settings/personal'); |
|
42 | - } |
|
43 | - |
|
44 | - public function getSection(): string { |
|
45 | - return 'sharing'; |
|
46 | - } |
|
47 | - |
|
48 | - public function getPriority(): int { |
|
49 | - return 90; |
|
50 | - } |
|
20 | + public function __construct( |
|
21 | + private IConfig $config, |
|
22 | + private IInitialState $initialState, |
|
23 | + private string $userId, |
|
24 | + ) { |
|
25 | + } |
|
26 | + |
|
27 | + public function getForm(): TemplateResponse { |
|
28 | + $defaultAcceptSystemConfig = $this->config->getSystemValueBool('sharing.enable_share_accept', false) ? 'no' : 'yes'; |
|
29 | + $defaultShareFolder = $this->config->getSystemValue('share_folder', '/'); |
|
30 | + $userShareFolder = Helper::getShareFolder(userId: $this->userId); |
|
31 | + $acceptDefault = $this->config->getUserValue($this->userId, Application::APP_ID, 'default_accept', $defaultAcceptSystemConfig) === 'yes'; |
|
32 | + $enforceAccept = $this->config->getSystemValueBool('sharing.force_share_accept', false); |
|
33 | + $allowCustomDirectory = $this->config->getSystemValueBool('sharing.allow_custom_share_folder', true); |
|
34 | + |
|
35 | + $this->initialState->provideInitialState('accept_default', $acceptDefault); |
|
36 | + $this->initialState->provideInitialState('enforce_accept', $enforceAccept); |
|
37 | + $this->initialState->provideInitialState('allow_custom_share_folder', $allowCustomDirectory); |
|
38 | + $this->initialState->provideInitialState('default_share_folder', $defaultShareFolder); |
|
39 | + $this->initialState->provideInitialState('share_folder', $userShareFolder); |
|
40 | + |
|
41 | + return new TemplateResponse('files_sharing', 'Settings/personal'); |
|
42 | + } |
|
43 | + |
|
44 | + public function getSection(): string { |
|
45 | + return 'sharing'; |
|
46 | + } |
|
47 | + |
|
48 | + public function getPriority(): int { |
|
49 | + return 90; |
|
50 | + } |
|
51 | 51 | } |