From a6cc362a4f61e34d432567562ad2e131912003ac Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 13 Mar 2014 10:16:36 +0200 Subject: [PATCH 1/3] fix multiple relate --- application/Espo/Core/Controllers/Record.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/Espo/Core/Controllers/Record.php b/application/Espo/Core/Controllers/Record.php index e38df81400..1fa92a6c6b 100644 --- a/application/Espo/Core/Controllers/Record.php +++ b/application/Espo/Core/Controllers/Record.php @@ -227,9 +227,9 @@ class Record extends Base if ($this->getRecordService()->linkEntity($id, $link, $foreignId)) { $result = $result || true; } - if ($result) { - return true; - } + } + if ($result) { + return true; } throw new Error(); From abeb0a6bd250237cffee082950085bd8a6d8b9c9 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 13 Mar 2014 10:16:55 +0200 Subject: [PATCH 2/3] fix multiple remove relat --- application/Espo/Core/Controllers/Record.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/Espo/Core/Controllers/Record.php b/application/Espo/Core/Controllers/Record.php index 1fa92a6c6b..a5beff89a5 100644 --- a/application/Espo/Core/Controllers/Record.php +++ b/application/Espo/Core/Controllers/Record.php @@ -255,9 +255,9 @@ class Record extends Base if ($this->getRecordService()->unlinkEntity($id, $link, $foreignId)) { $result = $result || true; } - if ($result) { - return true; - } + } + if ($result) { + return true; } throw new Error(); From 1ae4ac04d6bcf922735e5bfc9d575d00113888ca Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 13 Mar 2014 10:31:42 +0200 Subject: [PATCH 3/3] max length for number separators --- .../Espo/Resources/metadata/entityDefs/Preferences.json | 6 ++++-- .../Espo/Resources/metadata/entityDefs/Settings.json | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/application/Espo/Resources/metadata/entityDefs/Preferences.json b/application/Espo/Resources/metadata/entityDefs/Preferences.json index 4c848d8b50..c5a0a802a4 100644 --- a/application/Espo/Resources/metadata/entityDefs/Preferences.json +++ b/application/Espo/Resources/metadata/entityDefs/Preferences.json @@ -21,12 +21,14 @@ }, "thousandSeparator": { "type": "varchar", - "default": "," + "default": ",", + "maxLength": 1 }, "decimalMark": { "type": "varchar", "default": ".", - "required": true + "required": true, + "maxLength": 1 }, "defaultCurrency": { "type": "enum", diff --git a/application/Espo/Resources/metadata/entityDefs/Settings.json b/application/Espo/Resources/metadata/entityDefs/Settings.json index 8c4f78511f..a38612ddc3 100644 --- a/application/Espo/Resources/metadata/entityDefs/Settings.json +++ b/application/Espo/Resources/metadata/entityDefs/Settings.json @@ -40,12 +40,14 @@ }, "thousandSeparator": { "type": "varchar", - "default": "," + "default": ",", + "maxLength": 1 }, "decimalMark": { "type": "varchar", "default": ".", - "required": true + "required": true, + "maxLength": 1 }, "currencyList": { "type": "array",