From 874e8c94ebc0cf1a9018b12445b4a3e429757462 Mon Sep 17 00:00:00 2001 From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com> Date: Tue, 13 Sep 2022 19:44:47 +0200 Subject: [PATCH] Added option to disable theme updater in config --- .env | 6 +++++- resources/views/components/finishing.blade.php | 3 +++ resources/views/studio/theme.blade.php | 4 +++- storage/backups/default_settings | 6 +++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 134c3a3..f51eb60 100644 --- a/.env +++ b/.env @@ -84,4 +84,8 @@ FORCE_HTTPS=false #=Defines wether or not themes are allowed to inject custom code. #=Themes V2 can now implement fully custom code which you might want to disable for security reasons. -ALLOW_CUSTOM_CODE_IN_THEMES=true \ No newline at end of file +ALLOW_CUSTOM_CODE_IN_THEMES=true + +#ENABLE_THEME_UPDATER=Determines if the theme updater should be enabled or not, default is true. +#=ENABLE_THEME_UPDATER either true or false. +ENABLE_THEME_UPDATER=true \ No newline at end of file diff --git a/resources/views/components/finishing.blade.php b/resources/views/components/finishing.blade.php index dcb2dfd..f5c7060 100644 --- a/resources/views/components/finishing.blade.php +++ b/resources/views/components/finishing.blade.php @@ -16,6 +16,9 @@ if(EnvEditor::keyExists('ALLOW_CUSTOM_CODE_IN_THEMES')){ /* Do nothing if key already exists */ } else {EnvEditor::addKey('ALLOW_CUSTOM_CODE_IN_THEMES', 'true');} + if(EnvEditor::keyExists('ENABLE_THEME_UPDATER')){ /* Do nothing if key already exists */ + } else {EnvEditor::addKey('ENABLE_THEME_UPDATER', 'true');} + if (!config()->has('advanced-config.expand_panel_admin_menu_permanently') and !config()->has('disable_default_password_notice')) { function getStringBetween($string, $start, $end) { diff --git a/resources/views/studio/theme.blade.php b/resources/views/studio/theme.blade.php index f9765d9..26b4142 100644 --- a/resources/views/studio/theme.blade.php +++ b/resources/views/studio/theme.blade.php @@ -38,7 +38,7 @@ @if(auth()->user()->role == 'admin') - +@if(env('ENABLE_THEME_UPDATER') == 'true')