From 079f7c4e96df6735a8bfe6235e5fc290c42d9266 Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Wed, 13 Feb 2019 14:00:13 +0100 Subject: [PATCH] ## 1.5.6 (2019-02-12) Evolution release (Ann) * (bluefox) Fix let's encrypt * (bluefox) Fix "iob" script * (Dominic Griesel) Revert the changes to `del[Foreign]State`, so the object is not deleted. * (bluefox) always install the version from repository and not the latest from npm * (Ingo Fischer) Root should always npm install with --unsafe-perm * (bluefox) fix iobroker stop * (bluefox) fix error with formatDate --- CHANGELOG.md | 3 ++- io-package.json | 4 ++-- lib/adapter.js | 21 ++++++++++++++++++--- package.json | 2 +- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9055fc8b08..97f44bd1d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ -## 1.5.5 (2019-02-12) Evolution release (Ann) +## 1.5.6 (2019-02-12) Evolution release (Ann) * (bluefox) Fix let's encrypt * (bluefox) Fix "iob" script * (Dominic Griesel) Revert the changes to `del[Foreign]State`, so the object is not deleted. * (bluefox) always install the version from repository and not the latest from npm * (Ingo Fischer) Root should always npm install with --unsafe-perm * (bluefox) fix iobroker stop +* (bluefox) fix error with formatDate ## 1.5.3 (2018-09-15) Evolution release (Ann) * (bluefox) disable the auto-control of quality codes diff --git a/io-package.json b/io-package.json index 8efe1209a2..1bd952a9cf 100644 --- a/io-package.json +++ b/io-package.json @@ -1,7 +1,7 @@ { "common": { "name": "js-controller", - "version": "1.5.5", + "version": "1.5.6", "platform": "Javascript/Node.js", "controller": true, "title": "JS controller", @@ -18,7 +18,7 @@ "zh-cn": "JS控制器" }, "news": { - "1.5.5": { + "1.5.6": { "en": "let's encrypt was fixed\nFix iob script\nAlways install the version from repository and not the latest from npm\nRoot should always npm install with --unsafe-perm\niobroker stop was fixed", "de": "Lass uns verschlüsseln wurde behoben\nIob -Skript korrigieren\nInstallieren Sie die Version immer aus dem Repository und nicht die neueste aus npm\nRoot sollte npm immer mit --unsafe-perm installieren\nIobroker-Stopp wurde behoben", "ru": "«давайте шифровать» было исправлено\nИсправить скрипт iob\nВсегда устанавливайте версию из репозитория, а не самую последнюю из npm\nRoot всегда должен устанавливать npm с помощью --unsafe-perm\nостановка iobroker была исправлена", diff --git a/lib/adapter.js b/lib/adapter.js index e6468a37aa..e192a00e7b 100644 --- a/lib/adapter.js +++ b/lib/adapter.js @@ -909,8 +909,12 @@ function Adapter(options) { if (options.useFormatDate) { that.getForeignObject('system.config', (err, data) => { if (data && data.common) { - that.dateFormat = data.common.dateFormat; - that.isFloatComma = data.common.isFloatComma; + that.dateFormat = data.common.dateFormat; + that.isFloatComma = data.common.isFloatComma; + that.language = data.common.language; + that.latitude = data.common.latitude; + that.longitude = data.common.longitude; + that.defaultHistory = data.common.defaultHistory; } if (typeof cb === 'function') cb(); }); @@ -944,6 +948,15 @@ function Adapter(options) { } } + if (id === 'system.config' && obj && obj.common && (options.useFormatDate || that.defaultHistory !== undefined)) { + that.dateFormat = obj.common.dateFormat; + that.isFloatComma = obj.common.isFloatComma; + that.language = obj.common.language; + that.latitude = obj.common.latitude; + that.longitude = obj.common.longitude; + that.defaultHistory = obj.common.defaultHistory; + } + // process autosubscribe adapters if (id.match(/^system\.adapter\./)) { if (obj && obj.common.subscribable) { @@ -3454,7 +3467,9 @@ function Adapter(options) { if (!that.defaultHistory) { // read default history instance from system.config return that.getForeignObject('system.config', (err, data) => { - if (data && data.common) that.defaultHistory = data.common.defaultHistory; + if (data && data.common) { + that.defaultHistory = data.common.defaultHistory; + } // if no default history set if (!that.defaultHistory) { diff --git a/package.json b/package.json index 1e91e9c53d..2f45f073e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.js-controller", - "version": "1.5.5", + "version": "1.5.6", "engines": { "node": ">=4.8.7" },