From 311983997ee81472946017f0caff896e1c1a86d8 Mon Sep 17 00:00:00 2001 From: trendschau Date: Mon, 14 Jul 2025 20:16:37 +0200 Subject: [PATCH] Finish 2.18.0 --- cache/timer.yaml | 2 +- system/typemill/Models/Settings.php | 27 +++----------------------- system/typemill/settings/defaults.yaml | 2 +- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/cache/timer.yaml b/cache/timer.yaml index 70a5272..a474e94 100644 --- a/cache/timer.yaml +++ b/cache/timer.yaml @@ -1,2 +1,2 @@ licenseupdate: 1751827655 -refreshnavi: 1752352809 +refreshnavi: 1752466762 diff --git a/system/typemill/Models/Settings.php b/system/typemill/Models/Settings.php index c227e23..fb6b3cf 100644 --- a/system/typemill/Models/Settings.php +++ b/system/typemill/Models/Settings.php @@ -189,35 +189,14 @@ class Settings # remove them from $newSettings to avoid overwriting twice unset($newSettings['plugins'], $newSettings['themes']); + # add current theme from usersettings + $newSettings['theme'] = $userSettings['theme']; + # final combined settings $settings = array_merge($newSettings, [ 'plugins' => $plugins, 'themes' => $themes, ]); - - /* - # merge usersettings with new settings - $settings = array_merge($userSettings, $newSettings); - - # make sure that multidimensional arrays are merged correctly - # for example: only one plugin data will be passed with new settings, with array merge all others will be deleted. - foreach($newSettings as $key => $settingsItems) - { - if(is_array($settingsItems) && isset($userSettings[$key])) - { - if($this->array_is_list($settingsItems)) - { - # for numeric/list arrays instead of associative arrays we only use new values - $settings[$key] = $newSettings[$key]; - } - else - { - # changed from array_merge to array_replace to preserve the index, otherwise numeric values get re-indexed. Alternative is - $settings[$key] = array_replace($userSettings[$key], $newSettings[$key]); - } - } - } - */ } if($this->storage->updateYaml('settingsFolder', '', 'settings.yaml', $settings)) diff --git a/system/typemill/settings/defaults.yaml b/system/typemill/settings/defaults.yaml index e8c45fb..7f07413 100644 --- a/system/typemill/settings/defaults.yaml +++ b/system/typemill/settings/defaults.yaml @@ -1,4 +1,4 @@ -version: '2.17.4' +version: '2.18.0' title: 'Typemill' author: 'Unknown' copyright: false