Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend

This commit is contained in:
Taras Machyshyn
2014-02-27 18:17:31 +02:00
4 changed files with 24 additions and 9 deletions
+4 -2
View File
@@ -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();
}
@@ -19,5 +19,11 @@
"smtpPassword": "Password"
},
"links": {
},
"options": {
"weekStart": {
"0": "Sunday",
"1": "Monday"
}
}
}
@@ -26,6 +26,10 @@
"tabList": "Tab List",
"quickCreateList": "Quick Create List"
},
"links": {
"options": {
"weekStart": {
"0": "Sunday",
"1": "Monday"
}
}
}
+9 -6
View File
@@ -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);
}
}
}