File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
apps/theming/lib/Controller Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public function updateStylesheet($setting, $value) {
9292 if (strlen ($ value ) > 500 ) {
9393 $ error = $ this ->l10n ->t ('The given legal notice address is too long ' );
9494 }
95- if (!$ this ->isValidUrl ($ value )) {
95+ if ($ value !== '' && !$ this ->isValidUrl ($ value )) {
9696 $ error = $ this ->l10n ->t ('The given legal notice address is not a valid URL ' );
9797 }
9898 break ;
@@ -103,7 +103,7 @@ public function updateStylesheet($setting, $value) {
103103 if (strlen ($ value ) > 500 ) {
104104 $ error = $ this ->l10n ->t ('The given privacy policy address is too long ' );
105105 }
106- if (!$ this ->isValidUrl ($ value )) {
106+ if ($ value !== '' && !$ this ->isValidUrl ($ value )) {
107107 $ error = $ this ->l10n ->t ('The given privacy policy address is not a valid URL ' );
108108 }
109109 break ;
@@ -308,6 +308,8 @@ public function undo(string $setting): DataResponse {
308308 $ setting = match ($ setting ) {
309309 'primaryColor ' => 'primary_color ' ,
310310 'backgroundColor ' => 'background_color ' ,
311+ 'legalNoticeUrl ' => 'imprintUrl ' ,
312+ 'privacyPolicyUrl ' => 'privacyUrl ' ,
311313 default => $ setting ,
312314 };
313315 $ value = $ this ->themingDefaults ->undo ($ setting );
You can’t perform that action at this time.
0 commit comments