Merge branch 'hotfix/5.6.3'
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -251,4 +251,9 @@ class DateTime
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function getSystemNowString()
|
||||
{
|
||||
return date(self::$systemDateTimeFormat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -68,7 +68,7 @@ class LeadCapture extends Record
|
||||
|
||||
$attributeList = [];
|
||||
|
||||
$attributeIgnoreList = ['emailAddressIsOptedOut'];
|
||||
$attributeIgnoreList = ['emailAddressIsOptedOut', 'phoneNumberIsOptedOut', 'emailAddressData', 'phoneNumberData'];
|
||||
|
||||
$fieldList = $entity->get('fieldList');
|
||||
if (is_array($fieldList)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
<div class="row search-row">
|
||||
<div class="form-group col-md-6 col-sm-7">
|
||||
<div class="form-group{{#if isWide}} col-lg-7{{/if}} col-md-8 col-sm-9">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn left-dropdown{{#unless leftDropdown}} hidden{{/unless}}">
|
||||
<button type="button" class="btn btn-default dropdown-toggle filters-button" title="{{translate 'Filter'}}" data-toggle="dropdown" tabindex="-1">
|
||||
@@ -32,24 +32,22 @@
|
||||
<button type="button" class="btn btn-primary search btn-icon btn-icon-x-wide" data-action="search" title="{{translate 'Search'}}">
|
||||
<span class="fa fa-search"></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-icon-x-wide" data-action="reset" title="{{translate 'Reset'}}">
|
||||
<span class="fas fa-redo-alt"></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-icon-wide dropdown-toggle add-filter-button" data-toggle="dropdown" tabindex="-1">
|
||||
<span class="fas fa-ellipsis-v"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right filter-list">
|
||||
<li class="dropdown-header">{{translate 'Add Field'}}</li>
|
||||
{{#each advancedFields}}
|
||||
<li data-name="{{name}}" class="{{#if checked}}hidden{{/if}}"><a href="javascript:" class="add-filter" data-action="addFilter" data-name="{{name}}">{{translate name scope=../entityType category='fields'}}</a></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-5">
|
||||
<div class="btn-group search-right-buttons-group">
|
||||
<button type="button" class="btn btn-default btn-icon-x-wide" data-action="reset" title="{{translate 'Reset'}}">
|
||||
<span class="fas fa-redo-alt"></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-icon-wide dropdown-toggle add-filter-button" data-toggle="dropdown" tabindex="-1">
|
||||
<span class="fas fa-ellipsis-v"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right filter-list">
|
||||
<li class="dropdown-header">{{translate 'Add Field'}}</li>
|
||||
{{#each advancedFields}}
|
||||
<li data-name="{{name}}" class="{{#if checked}}hidden{{/if}}"><a href="javascript:" class="add-filter" data-action="addFilter" data-name="{{name}}">{{translate name scope=../entityType category='fields'}}</a></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="form-group{{#if isWide}} col-lg-5{{/if}} col-md-4 col-sm-3">
|
||||
{{#if hasViewModeSwitcher}}
|
||||
<div class="btn-group view-mode-switcher-buttons-group">
|
||||
{{#each viewModeDataList}}
|
||||
|
||||
@@ -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: '<span class="fas fa-plus fa-sm"></span> ' + 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: '<span class="fas fa-plus fa-sm"></span> ' + 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();
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "5.6.2",
|
||||
"version": "5.6.3",
|
||||
"description": "",
|
||||
"main": "index.php",
|
||||
"repository": {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user