From 543c7869dfc3e2575f14057c32e8d24c4be56cbc Mon Sep 17 00:00:00 2001 From: trendschau Date: Wed, 24 Jun 2020 21:52:08 +0200 Subject: [PATCH 1/3] Hotfix 1.3.7.1 for notice component --- system/Controllers/SetupController.php | 18 ++++++++++-------- system/author/js/vue-blox.js | 14 +++++++------- system/system.php | 1 - 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/system/Controllers/SetupController.php b/system/Controllers/SetupController.php index e86ed78..bb764b3 100644 --- a/system/Controllers/SetupController.php +++ b/system/Controllers/SetupController.php @@ -32,8 +32,9 @@ class SetupController extends Controller # check php-version - if (version_compare(phpversion(), '7.0.0', '<')) { - $systemcheck['error'][] = 'The PHP-version of your server is ' . phpversion() . ' and Typemill needs at least 7.0.0'; + if (version_compare(phpversion(), '7.0.0', '<')) + { + $systemcheck['error'][] = 'The PHP-version of your server is ' . phpversion() . ' and Typemill needs at least 7.0.0'; } /* check if mod rewrite is enabled, does not work with PHP-fpm or NGINX @@ -44,18 +45,19 @@ class SetupController extends Controller } */ - # check if GD extension is enabled - if(!extension_loaded('gd')){ - $systemcheck['error'][] = 'The php-extension GD for image manipulation is not enabled.'; - } + # check if extensions are loaded + if(!extension_loaded('gd')){ $systemcheck['error'][] = 'The php-extension GD for image manipulation is not enabled.'; } + if(!extension_loaded('mbstring')){ $systemcheck['error'][] = 'The php-extension mbstring is not enabled.'; } + if(!extension_loaded('fileinfo')){ $systemcheck['error'][] = 'The php-extension fileinfo is not enabled.'; } + if(!extension_loaded('session')){ $systemcheck['error'][] = 'The php-extension session is not enabled.'; } + if(!extension_loaded('iconv')){ $systemcheck['error'][] = 'The php-extension iconv is not enabled.'; } $setuperrors = empty($systemcheck) ? false : 'Some system requirements for Typemill are missing.'; $systemcheck = empty($systemcheck) ? false : $systemcheck; - return $this->render($response, 'auth/setup.twig', array( 'messages' => $setuperrors, 'systemcheck' => $systemcheck )); + return $this->render($response, 'auth/setup.twig', array( 'messages' => $setuperrors, 'systemcheck' => $systemcheck )); } - public function create($request, $response, $args) { if($request->isPost()) diff --git a/system/author/js/vue-blox.js b/system/author/js/vue-blox.js index 81119fa..0ccc52d 100644 --- a/system/author/js/vue-blox.js +++ b/system/author/js/vue-blox.js @@ -780,7 +780,7 @@ const noticeComponent = Vue.component('notice-component', { '', data: function(){ return { - prefix: '! ', + prefix: '!', notice: '', noteclass: 'note1' } @@ -807,12 +807,12 @@ const noticeComponent = Vue.component('notice-component', { noticedown: function() { this.prefix = this.getNoticePrefix(this.compmarkdown); - this.prefix += "! "; - if(this.prefix.length > 4) + this.prefix = this.prefix + '!'; + if(this.prefix.length > 3) { - this.prefix = "! "; + this.prefix = '!'; } - this.noteclass = 'note' + (this.prefix.length-1); + this.noteclass = 'note' + (this.prefix.length); this.updatemarkdown(this.notice); }, getNoticePrefix: function(str) @@ -822,7 +822,7 @@ const noticeComponent = Vue.component('notice-component', { if(str[i] != '!'){ return prefix } prefix += '!'; } - return prefix+' '; + return prefix; }, updatemarkdown: function(value) { @@ -830,7 +830,7 @@ const noticeComponent = Vue.component('notice-component', { var lines = value.match(/^.*([\n\r]|$)/gm); - var notice = this.prefix + lines.join(this.prefix); + var notice = this.prefix + ' ' + lines.join(this.prefix+' '); this.$emit('updatedMarkdown', notice); }, diff --git a/system/system.php b/system/system.php index ba3b2f6..0c9662b 100644 --- a/system/system.php +++ b/system/system.php @@ -109,7 +109,6 @@ $dispatcher->dispatch('onPluginsLoaded', new OnPluginsLoaded($pluginNames)); # dispatch settings event and get all setting-updates from plugins $dispatcher->dispatch('onSettingsLoaded', new OnSettingsLoaded($settings))->getData(); - /****************************** * ADD DISPATCHER TO CONTAINER * ******************************/ From 333c884f735cc09cb1af9b7777dac7ebdacc19f7 Mon Sep 17 00:00:00 2001 From: trendschau Date: Thu, 25 Jun 2020 07:29:39 +0200 Subject: [PATCH 2/3] Hotfix 1.3.7.1 --- system/Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Settings.php b/system/Settings.php index 1be4f15..e11c922 100644 --- a/system/Settings.php +++ b/system/Settings.php @@ -78,7 +78,7 @@ class Settings 'contentFolder' => 'content', 'cache' => true, 'cachePath' => $rootPath . 'cache', - 'version' => '1.3.7', + 'version' => '1.3.7.1', 'setup' => true, 'welcome' => true, 'images' => ['live' => ['width' => 820], 'thumbs' => ['width' => 250, 'height' => 150]], From 51564e5a8562c611a179479fd96ef1bee0b830c2 Mon Sep 17 00:00:00 2001 From: trendschau Date: Thu, 25 Jun 2020 07:51:52 +0200 Subject: [PATCH 3/3] Hotfix 1.3.7.1 --- system/Settings.php | 2 +- system/Translations.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/Settings.php b/system/Settings.php index e11c922..95ead28 100644 --- a/system/Settings.php +++ b/system/Settings.php @@ -95,7 +95,7 @@ class Settings } - public function whichLanguage() + public static function whichLanguage() { # Check which languages are available $langs = []; diff --git a/system/Translations.php b/system/Translations.php index 810c170..d1c09dc 100644 --- a/system/Translations.php +++ b/system/Translations.php @@ -86,4 +86,4 @@ class Translations return $labels; } -} +} \ No newline at end of file