From 66cf0879576bad5443342307739ffe0fb8a8da74 Mon Sep 17 00:00:00 2001 From: trendschau Date: Tue, 30 Jan 2024 20:34:18 +0100 Subject: [PATCH 1/3] v2.1.2 fix error initial setup not saved as array in yaml --- composer.lock | 20 +++++++++---------- .../Controllers/ControllerWebSetup.php | 12 +++++------ system/typemill/Models/Settings.php | 4 +--- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/composer.lock b/composer.lock index e7f012d..b41a4fa 100644 --- a/composer.lock +++ b/composer.lock @@ -1143,16 +1143,16 @@ }, { "name": "slim/csrf", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/slimphp/Slim-Csrf.git", - "reference": "ebaaf295fd6d7224078d8ae3bba45329b31798c7" + "reference": "f66be9740283ed4f432535aff3623540e178013a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Csrf/zipball/ebaaf295fd6d7224078d8ae3bba45329b31798c7", - "reference": "ebaaf295fd6d7224078d8ae3bba45329b31798c7", + "url": "https://api.github.com/repos/slimphp/Slim-Csrf/zipball/f66be9740283ed4f432535aff3623540e178013a", + "reference": "f66be9740283ed4f432535aff3623540e178013a", "shasum": "" }, "require": { @@ -1163,10 +1163,10 @@ "psr/http-server-middleware": "^1.0" }, "require-dev": { - "phpspec/prophecy": "^1.15", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.7" + "phpspec/prophecy": "^1.18", + "phpspec/prophecy-phpunit": "^2.1", + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^3.8" }, "type": "library", "autoload": { @@ -1195,9 +1195,9 @@ ], "support": { "issues": "https://github.com/slimphp/Slim-Csrf/issues", - "source": "https://github.com/slimphp/Slim-Csrf/tree/1.3.0" + "source": "https://github.com/slimphp/Slim-Csrf/tree/1.4.0" }, - "time": "2022-11-05T19:27:53+00:00" + "time": "2024-01-22T09:08:27+00:00" }, { "name": "slim/flash", diff --git a/system/typemill/Controllers/ControllerWebSetup.php b/system/typemill/Controllers/ControllerWebSetup.php index f90e2b3..82f56ff 100644 --- a/system/typemill/Controllers/ControllerWebSetup.php +++ b/system/typemill/Controllers/ControllerWebSetup.php @@ -87,12 +87,6 @@ class ControllerWebSetup extends Controller if($username) { - usleep(30000); - - $user->setUser($username); - - $user->login(); - # create initial settings file $settingsModel = new Settings(); $settingsModel->createSettings([ @@ -101,9 +95,13 @@ class ControllerWebSetup extends Controller 'mailfromname' => $params['username'] ]); + $user->setUser($username); + + $user->login(); + $urlinfo = $this->c->get('urlinfo'); $route = $urlinfo['baseurl'] . '/tm/system'; - + usleep(30000); $this->c->get('flash')->addMessage('error', Translations::translate('Account created. Please login with your username and password now.')); diff --git a/system/typemill/Models/Settings.php b/system/typemill/Models/Settings.php index 2f7bac7..dc611ec 100644 --- a/system/typemill/Models/Settings.php +++ b/system/typemill/Models/Settings.php @@ -235,9 +235,7 @@ class Settings $defaults = array_merge($defaults, $defaultSettings); } - $initialSettings = $this->storage->updateYaml('settingsFolder', '', 'settings.yaml', [ - $defaults - ]); + $initialSettings = $this->storage->updateYaml('settingsFolder', '', 'settings.yaml', $defaults); if($initialSettings) { From 31df89f8827a6b1811946e3fb808d0b60f4ac6f0 Mon Sep 17 00:00:00 2001 From: trendschau Date: Tue, 30 Jan 2024 21:05:12 +0100 Subject: [PATCH 2/3] v2.1.2 fix error when change theme (string stored instead of array in themesettings/pluginsettings)) --- system/typemill/Controllers/ControllerApiSystemExtensions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/typemill/Controllers/ControllerApiSystemExtensions.php b/system/typemill/Controllers/ControllerApiSystemExtensions.php index c5eacf1..e8ef1cf 100644 --- a/system/typemill/Controllers/ControllerApiSystemExtensions.php +++ b/system/typemill/Controllers/ControllerApiSystemExtensions.php @@ -73,13 +73,13 @@ class ControllerApiSystemExtensions extends Controller if($params['type'] == 'plugins') { - $pluginsettings = $this->settings['plugins'][$params['name']] ?? $params['name']; + $pluginsettings = $this->settings['plugins'][$params['name']] ?? []; $pluginsettings['active'] = $params['checked']; $updatedSettings = $settings->updateSettings($pluginsettings, 'plugins', $params['name']); } elseif($params['type'] == 'themes') { - $themesettings = $this->settings['themes'][$params['name']] ?? $params['name']; + $themesettings = $this->settings['themes'][$params['name']] ?? []; $updatedSettings = $settings->updateSettings($themesettings, 'themes', $params['name']); if($updatedSettings) { From 7ae2408fdc03ef1f840bb13afd4c3117b9cff59c Mon Sep 17 00:00:00 2001 From: trendschau Date: Tue, 30 Jan 2024 22:14:16 +0100 Subject: [PATCH 3/3] V2.1.2 Finish and update readme --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 9a34662..1f38add 100644 --- a/readme.md +++ b/readme.md @@ -37,6 +37,8 @@ To run Typemill, you need the following: ## Installation +Check installations with different setups on [typemill.net](https://typemill.net/getting-started/installation) + ### Using ZIP File and FTP 1. Download and unpack the latest version of Typemill as a zip file from [Typemill Website](https://typemill.net). @@ -60,7 +62,7 @@ composer update ### Using Docker -(Details to be provided soon) +See description on [typemill.net](https://typemill.net/getting-started/installation/docker) ## Folder Permissions