From 6d2c63ecffd86556a94458f6d57c7ae6abf26fb9 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 23 Oct 2024 20:12:32 +0200 Subject: [PATCH 1/2] fix(settings): Do not use `null` on `string` parameter for sharing disclaimer Signed-off-by: Ferdinand Thiessen --- apps/settings/lib/Settings/Admin/Sharing.php | 2 +- .../components/AdminSettingsSharingForm.vue | 34 ++-- .../tests/Settings/Admin/SharingTest.php | 182 +++++++++--------- build/psalm-baseline.xml | 5 - 4 files changed, 112 insertions(+), 111 deletions(-) diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php index c9ad58250c9ac..f1c9052f4c3a6 100644 --- a/apps/settings/lib/Settings/Admin/Sharing.php +++ b/apps/settings/lib/Settings/Admin/Sharing.php @@ -62,7 +62,7 @@ public function getForm() { 'enforceExpireDate' => $this->getHumanBooleanConfig('core', 'shareapi_enforce_expire_date'), 'excludeGroups' => $this->config->getAppValue('core', 'shareapi_exclude_groups', 'no'), 'excludeGroupsList' => json_decode($excludedGroups, true) ?? [], - 'publicShareDisclaimerText' => $this->config->getAppValue('core', 'shareapi_public_link_disclaimertext', null), + 'publicShareDisclaimerText' => $this->config->getAppValue('core', 'shareapi_public_link_disclaimertext'), 'enableLinkPasswordByDefault' => $this->getHumanBooleanConfig('core', 'shareapi_enable_link_password_by_default'), 'defaultPermissions' => (int)$this->config->getAppValue('core', 'shareapi_default_permissions', (string)Constants::PERMISSION_ALL), 'defaultInternalExpireDate' => $this->getHumanBooleanConfig('core', 'shareapi_default_internal_expire_date'), diff --git a/apps/settings/src/components/AdminSettingsSharingForm.vue b/apps/settings/src/components/AdminSettingsSharingForm.vue index 93f30b2262c9f..8e31fc8f96df9 100644 --- a/apps/settings/src/components/AdminSettingsSharingForm.vue +++ b/apps/settings/src/components/AdminSettingsSharingForm.vue @@ -170,7 +170,7 @@ {{ t('settings', 'Show disclaimer text on the public link upload page (only shown when the file list is hidden)') }} -