diff --git a/application/Espo/Core/Console/Commands/Upgrade.php b/application/Espo/Core/Console/Commands/Upgrade.php index 5e1dd5353b..95df4a9c37 100644 --- a/application/Espo/Core/Console/Commands/Upgrade.php +++ b/application/Espo/Core/Console/Commands/Upgrade.php @@ -48,7 +48,7 @@ class Upgrade extends Base return; } - fwrite(\STDOUT, "EspoCRM will be upgaded to version {$nextVersion} now. Type 'Y' to continue.\n"); + fwrite(\STDOUT, "EspoCRM will be upgraded to version {$nextVersion} now. Enter [Y] to continue.\n"); if (!$this->confirm()) { echo "Upgrade canceled.\n"; diff --git a/application/Espo/Core/Utils/DateTime.php b/application/Espo/Core/Utils/DateTime.php index f6c0418b06..6d92cde4e0 100644 --- a/application/Espo/Core/Utils/DateTime.php +++ b/application/Espo/Core/Utils/DateTime.php @@ -251,4 +251,9 @@ class DateTime return false; } + + public static function getSystemNowString() + { + return date(self::$systemDateTimeFormat); + } } diff --git a/application/Espo/Jobs/Cleanup.php b/application/Espo/Jobs/Cleanup.php index f5f1e6cb08..2c9dbe368d 100644 --- a/application/Espo/Jobs/Cleanup.php +++ b/application/Espo/Jobs/Cleanup.php @@ -428,7 +428,7 @@ class Cleanup extends \Espo\Core\Jobs\Base { if (!$this->getConfig()->get('cleanupDeletedRecords')) return; $period = '-' . $this->getConfig()->get('cleanupDeletedRecordsPeriod', $this->cleanupDeletedRecordsPeriod); - $datetime = new \DateTime('-' . $period); + $datetime = new \DateTime($period); $scopeList = array_keys($this->getMetadata()->get(['scopes'])); foreach ($scopeList as $scope) { diff --git a/application/Espo/ORM/Entity.php b/application/Espo/ORM/Entity.php index 91a8a999d7..81f384ecd2 100644 --- a/application/Espo/ORM/Entity.php +++ b/application/Espo/ORM/Entity.php @@ -453,15 +453,21 @@ abstract class Entity implements IEntity public function getFetched($name) { + if ($name === 'id') { + return $this->id; + } if (isset($this->fetchedValuesContainer[$name])) { return $this->fetchedValuesContainer[$name]; } return null; } - public function hasFetched($attributeName) + public function hasFetched($name) { - return array_key_exists($attributeName, $this->fetchedValuesContainer); + if ($name === 'id') { + return !!$this->id; + } + return array_key_exists($name, $this->fetchedValuesContainer); } public function resetFetchedValues() diff --git a/application/Espo/Services/LeadCapture.php b/application/Espo/Services/LeadCapture.php index c4a5c4cbd7..32417ab8a0 100644 --- a/application/Espo/Services/LeadCapture.php +++ b/application/Espo/Services/LeadCapture.php @@ -68,7 +68,7 @@ class LeadCapture extends Record $attributeList = []; - $attributeIgnoreList = ['emailAddressIsOptedOut']; + $attributeIgnoreList = ['emailAddressIsOptedOut', 'phoneNumberIsOptedOut', 'emailAddressData', 'phoneNumberData']; $fieldList = $entity->get('fieldList'); if (is_array($fieldList)) { diff --git a/client/res/templates/record/search.tpl b/client/res/templates/record/search.tpl index 637f1f3a73..3780aebf9c 100644 --- a/client/res/templates/record/search.tpl +++ b/client/res/templates/record/search.tpl @@ -1,6 +1,6 @@
-
+
+ + +
-
-
- - - -
+
{{#if hasViewModeSwitcher}}
{{#each viewModeDataList}} diff --git a/client/src/views/list.js b/client/src/views/list.js index baba8752db..f53c32fbe6 100644 --- a/client/src/views/list.js +++ b/client/src/views/list.js @@ -162,7 +162,6 @@ define('views/list', ['views/main', 'search-manager'], function (Dep, SearchMana if (this.quickCreate) { this.menu.buttons.unshift({ action: 'quickCreate', - //label: 'Create ' + this.scope, html: ' ' + this.translate('Create ' + this.scope, 'labels', this.scope), style: 'default', acl: 'create', @@ -172,7 +171,6 @@ define('views/list', ['views/main', 'search-manager'], function (Dep, SearchMana this.menu.buttons.unshift({ link: '#' + this.scope + '/create', action: 'create', - //label: 'Create ' + this.scope, html: ' ' + this.translate('Create ' + this.scope, 'labels', this.scope), style: 'default', acl: 'create', @@ -188,7 +186,8 @@ define('views/list', ['views/main', 'search-manager'], function (Dep, SearchMana searchManager: this.searchManager, scope: this.scope, viewMode: this.viewMode, - viewModeList: this.viewModeList + viewModeList: this.viewModeList, + isWide: true, }, function (view) { this.listenTo(view, 'reset', function () { this.resetSorting(); diff --git a/client/src/views/record/search.js b/client/src/views/record/search.js index 504fb72527..1a8b890dcc 100644 --- a/client/src/views/record/search.js +++ b/client/src/views/record/search.js @@ -72,7 +72,8 @@ define('views/record/search', 'view', function (Dep) { textFilterDisabled: this.textFilterDisabled, viewMode: this.viewMode, viewModeDataList: this.viewModeDataList || [], - hasViewModeSwitcher: this.viewModeList && this.viewModeList.length > 1 + hasViewModeSwitcher: this.viewModeList && this.viewModeList.length > 1, + isWide: this.options.isWide, }; }, diff --git a/diff.js b/diff.js index eb3a178c0f..b263980860 100644 --- a/diff.js +++ b/diff.js @@ -141,17 +141,13 @@ execute('git diff --name-only ' + versionFrom, function (stdout) { execute('git tag', function (stdout) { var versionList = []; - var occured = false; tagList = stdout.split('\n').forEach(function (tag) { if (tag == versionFrom) { - occured = true; + versionList.push(tag); } if (!tag || tag == version) { return; } - if (occured) { - versionList.push(tag); - } }); if (isDev) { diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less index 84d676b146..2e34665ead 100644 --- a/frontend/less/espo/custom.less +++ b/frontend/less/espo/custom.less @@ -748,16 +748,6 @@ ul.dropdown-menu > li.checkbox:last-child { margin-right: @panel-padding; } -.search-row { - margin-left: -3px !important; - margin-right: -3px !important; -} - -.search-row > div { - padding-left: 2px !important; - padding-right: 2px !important; -} - .cell > .field { overflow-wrap: break-word; word-wrap: break-word; @@ -1850,6 +1840,11 @@ span.fas.color-icon { position: relative; } +td > span.fas.color-icon { + left: 0; + margin-right: 0; +} + #global-search-panel .panel-body .cell > .color-icon { margin-right: 5px; } @@ -2665,10 +2660,6 @@ pre > code { } } -.search-container input.text-filter { - margin-left: 0 !important; -} - @media screen and (min-width: @screen-sm-min) { .search-container .view-mode-switcher-buttons-group { float: right; @@ -2698,7 +2689,7 @@ pre > code { width: 100%; } - .search-row .search-right-buttons-group { + .search-row .view-mode-switcher-buttons-group { float: right; } diff --git a/package.json b/package.json index 1e8d468e65..4a4e361a1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "espocrm", - "version": "5.6.2", + "version": "5.6.3", "description": "", "main": "index.php", "repository": { diff --git a/tests/integration/Core/BaseTestCase.php b/tests/integration/Core/BaseTestCase.php index 821e616d91..953ddb3ac9 100644 --- a/tests/integration/Core/BaseTestCase.php +++ b/tests/integration/Core/BaseTestCase.php @@ -72,14 +72,15 @@ abstract class BaseTestCase extends \PHPUnit\Framework\TestCase return $this->espoTester->getApplication(true, $clearCache); } - protected function auth($userName, $password = null, $portalId = null) + protected function auth($userName, $password = null, $portalId = null, $authenticationMethod = null) { $this->userName = $userName; $this->password = $password; $this->portalId = $portalId; + $this->authenticationMethod = $authenticationMethod; if (isset($this->espoTester)) { - $this->espoTester->auth($userName, $password, $portalId); + $this->espoTester->auth($userName, $password, $portalId, $authenticationMethod); } } @@ -126,7 +127,7 @@ abstract class BaseTestCase extends \PHPUnit\Framework\TestCase $this->espoTester = new Tester($params); $this->espoTester->initialize(); - $this->auth($this->userName, $this->password); + $this->auth($this->userName, $this->password, null, $this->authenticationMethod); $this->beforeStartApplication(); $this->espoApplication = $this->createApplication(); diff --git a/tests/integration/Core/Tester.php b/tests/integration/Core/Tester.php index 4d330af08e..d3d56923b6 100644 --- a/tests/integration/Core/Tester.php +++ b/tests/integration/Core/Tester.php @@ -63,6 +63,8 @@ class Tester protected $portalId = null; + protected $authenticationMethod = null; + protected $defaultUserPassword = '1'; public function __construct(array $params) @@ -107,11 +109,12 @@ class Tester return $returns; } - public function auth($userName, $password = null, $portalId = null) + public function auth($userName, $password = null, $portalId = null, $authenticationMethod = null) { $this->userName = $userName; $this->password = $password; $this->portalId = $portalId; + $this->authenticationMethod = $authenticationMethod; } public function getApplication($reload = false, $clearCache = true) @@ -127,7 +130,7 @@ class Tester if (isset($this->userName)) { $this->password = isset($this->password) ? $this->password : $this->defaultUserPassword; - $auth->login($this->userName, $this->password); + $auth->login($this->userName, $this->password, $this->authenticationMethod); } else { $auth->useNoAuth(); }