From 29b13248f039a85c1f930635535eb0b73565b77f Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 27 Feb 2014 11:13:08 +0200 Subject: [PATCH 1/4] fix audited notes --- application/Espo/Services/Stream.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/application/Espo/Services/Stream.php b/application/Espo/Services/Stream.php index 561075b41b..a40879e361 100644 --- a/application/Espo/Services/Stream.php +++ b/application/Espo/Services/Stream.php @@ -385,15 +385,18 @@ class Stream extends \Espo\Core\Services\Base $became = array(); foreach ($auditedFields as $field => $attrs) { - foreach ($attrs as $attr) { - $updated = false; + $updated = false; + foreach ($attrs as $attr) { if ($entity->get($attr) != $entity->getFetched($attr)) { - $was[$attr] = $entity->getFetched($attr); - $became[$attr] = $entity->get($attr); + $updated = true; } - if ($updated) { - $updatedFields[] = $field; + } + if ($updated) { + $updatedFields[] = $field; + foreach ($attrs as $attr) { + $was[$attr] = $entity->getFetched($attr); + $became[$attr] = $entity->get($attr); } } } From a6878509c2d9447cfba3d1e6b3b1841e0eb94e1e Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 27 Feb 2014 12:16:05 +0200 Subject: [PATCH 2/4] fix preferences --- application/Espo/Controllers/Preferences.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/Espo/Controllers/Preferences.php b/application/Espo/Controllers/Preferences.php index 7abd11e464..61b5cadf40 100644 --- a/application/Espo/Controllers/Preferences.php +++ b/application/Espo/Controllers/Preferences.php @@ -51,8 +51,10 @@ class Preferences extends \Espo\Core\Controllers\Base $userId = $params['id']; $this->handleUserAccess($userId); - $entity = $this->getEntityManager()->getEntity('Preferences', $userId); - $entity->set('name', $this->getUser()->get('name')); + $entity = $this->getEntityManager()->getEntity('Preferences', $userId); + $user = $this->getEntityManager()->getEntity('User', $userId); + + $entity->set('name', $user->get('name')); if ($entity) { return $entity->toArray(); } From 9254fe1fb664e6d80c087e184b522ade92804819 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 27 Feb 2014 15:30:33 +0200 Subject: [PATCH 3/4] fix pref 2 --- application/Espo/Resources/i18n/en_US/Preferences.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/Espo/Resources/i18n/en_US/Preferences.json b/application/Espo/Resources/i18n/en_US/Preferences.json index 16612a1408..26203807b0 100644 --- a/application/Espo/Resources/i18n/en_US/Preferences.json +++ b/application/Espo/Resources/i18n/en_US/Preferences.json @@ -19,5 +19,11 @@ "smtpPassword": "Password" }, "links": { + }, + "options": { + "weekStart": { + "0": "Sunday", + "1": "Monday" + } } } From 3a7bc8e3817388ae4c13fbc199c8c6f242d60d0f Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 27 Feb 2014 17:13:10 +0200 Subject: [PATCH 4/4] weekStart labels --- application/Espo/Resources/i18n/en_US/Settings.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/Espo/Resources/i18n/en_US/Settings.json b/application/Espo/Resources/i18n/en_US/Settings.json index 7ca790f678..4abd1f26b5 100644 --- a/application/Espo/Resources/i18n/en_US/Settings.json +++ b/application/Espo/Resources/i18n/en_US/Settings.json @@ -26,6 +26,10 @@ "tabList": "Tab List", "quickCreateList": "Quick Create List" }, - "links": { + "options": { + "weekStart": { + "0": "Sunday", + "1": "Monday" + } } }