mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 20:07:01 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d04f72cfd8 | ||
|
|
a9203b8e22 | ||
|
|
e89c7c9328 | ||
|
|
7808865080 | ||
|
|
404e2de3b6 | ||
|
|
f02dabc540 | ||
|
|
c29da46a97 | ||
|
|
b7702d2418 | ||
|
|
2bc56db4c6 | ||
|
|
dd0ef5455e |
@@ -36,7 +36,7 @@ class FiltersMatcher
|
||||
{
|
||||
foreach ($filterList as $filter) {
|
||||
if ($filter->get('from')) {
|
||||
if (strtolower($filter->get('from')) === strtolower($email->get('from'))) {
|
||||
if ($this->matchString(strtolower($filter->get('from')), strtolower($email->get('from')))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class FiltersMatcher
|
||||
if ($email->get('to')) {
|
||||
$toArr = explode(';', $email->get('to'));
|
||||
foreach ($toArr as $to) {
|
||||
if (strtolower($to) === strtolower($filter->get('to'))) {
|
||||
if ($this->matchString(strtolower($filter->get('to')), strtolower($to))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -795,7 +795,7 @@ class Base
|
||||
|
||||
foreach ($fieldList as $field) {
|
||||
if (
|
||||
strlen($item['value']) >= self::MIN_LENGTH_FOR_CONTENT_SEARCH
|
||||
strlen($textFilter) >= self::MIN_LENGTH_FOR_CONTENT_SEARCH
|
||||
&&
|
||||
!empty($fieldDefs[$field]['type']) && $fieldDefs[$field]['type'] == 'text'
|
||||
) {
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
"Automotive": "Automotive",
|
||||
"Banking": "Banking",
|
||||
"Biotechnology": "Biotechnology",
|
||||
"Building Materials & Equipment": "Building Materials & Equipment",
|
||||
"Chemical": "Chemical",
|
||||
"Computer": "Computer",
|
||||
"Education": "Education",
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
"Automotive",
|
||||
"Banking",
|
||||
"Biotechnology",
|
||||
"Building Materials & Equipment",
|
||||
"Chemical",
|
||||
"Computer",
|
||||
"Education",
|
||||
@@ -47,7 +48,7 @@
|
||||
"Real Estate",
|
||||
"Service",
|
||||
"Sports",
|
||||
"Sofware",
|
||||
"Software",
|
||||
"Technology",
|
||||
"Telecommunications",
|
||||
"Television",
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
"Create Only": "Nur erstellen",
|
||||
"Create and Update": "Erstellen und aktualisieren",
|
||||
"Update Only": "Nur aktualisieren",
|
||||
"Update by": "Aktualisieren durch"
|
||||
"Update by": "Aktualisieren durch",
|
||||
"File (CSV)": "Datei (CSV)"
|
||||
},
|
||||
"messages": {
|
||||
"utf8": "Sollte UTF-8 kodiert sein",
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
"name": "Just a name of the filter.",
|
||||
"subject": "Use wildcard *:\n\ntext* - starts with text,\n*text* - contains text,\n*text - ends with text.",
|
||||
"bodyContains": "Body of email contains any of specified words or phrases.",
|
||||
"from": "Emails being sent from the specified address. Leave empty if not needed.",
|
||||
"to": "Emails being sent to the specified address. Leave empty if not needed.",
|
||||
"from": "Emails being sent from the specified address. Leave empty if not needed. You can use wildcard *.",
|
||||
"to": "Emails being sent to the specified address. Leave empty if not needed. You can use wildcard *.",
|
||||
"parent": "Leave it empty to apply this filter globally (to all incoming emails)."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
"Create Only": "Create Only",
|
||||
"Create and Update": "Create & Update",
|
||||
"Update Only": "Update Only",
|
||||
"Update by": "Update by"
|
||||
"Update by": "Update by",
|
||||
"File (CSV)": "File (CSV)"
|
||||
},
|
||||
"messages": {
|
||||
"utf8": "Should be UTF-8 encoded",
|
||||
|
||||
@@ -9,12 +9,14 @@
|
||||
"from": {
|
||||
"type": "varchar",
|
||||
"maxLength": 255,
|
||||
"tooltip": true
|
||||
"tooltip": true,
|
||||
"trim": true
|
||||
},
|
||||
"to": {
|
||||
"type": "varchar",
|
||||
"maxLength": 255,
|
||||
"tooltip": true
|
||||
"tooltip": true,
|
||||
"trim": true
|
||||
},
|
||||
"subject": {
|
||||
"type": "varchar",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4 form-group">
|
||||
<label class="control-label">{{translate 'File' scope='Import'}}</label>
|
||||
<label class="control-label">{{translate 'File (CSV)' scope='Import'}}</label>
|
||||
<div>
|
||||
<input type="file" id="import-file">
|
||||
</div>
|
||||
|
||||
@@ -152,7 +152,7 @@ Espo.define('controller', [], function () {
|
||||
|
||||
handleAccessGlobal: function () {
|
||||
if (!this.checkAccessGlobal()) {
|
||||
throw new Espo.Exceptions.AccessDenied("Denied access to action '" + this.name + "#" + action + "'");
|
||||
throw new Espo.Exceptions.AccessDenied("Denied access to '" + this.name + "'");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -142,7 +142,9 @@ Espo.define('views/admin/entity-manager/modals/edit-entity', ['views/modal', 'mo
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}, this);
|
||||
}, this).sort(function (v1, v2) {
|
||||
return this.translate(v1, 'fields', scope).localeCompare(this.translate(v2, 'fields', scope));
|
||||
}.bind(this));
|
||||
|
||||
var translatedOptions = {};
|
||||
orderableFieldList.forEach(function (item) {
|
||||
|
||||
@@ -67,7 +67,7 @@ Espo.define('views/edit', 'views/main', function (Dep) {
|
||||
if (this.options.noHeaderLinks) {
|
||||
arr.push(name);
|
||||
} else {
|
||||
arr.push('<a href="#' + this.model.name + '/view/' + this.model.id + '" class="action" data-action="navigateToRoot">' + name + '</a>');
|
||||
arr.push('<a href="#' + this.model.name + '/view/' + this.model.id + '" class="action">' + name + '</a>');
|
||||
}
|
||||
}
|
||||
return this.buildHeaderHtml(arr);
|
||||
|
||||
@@ -58,7 +58,7 @@ Espo.define('views/email/record/detail', 'views/record/detail', function (Dep) {
|
||||
if (!this.model.get('isRead')) {
|
||||
this.model.set({
|
||||
isRead: true
|
||||
}, {silent: true});
|
||||
});
|
||||
}
|
||||
}, this);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ Espo.define('views/global-search/global-search', 'view', function (Dep) {
|
||||
runSearch: function (text) {
|
||||
var text = this.$input.val();
|
||||
if (text != '' && text.length > 2) {
|
||||
text = encodeURI(text);
|
||||
text = text;
|
||||
this.search(text);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "3.7.2",
|
||||
"version": "3.7.3",
|
||||
"description": "",
|
||||
"main": "index.php",
|
||||
"repository": {
|
||||
|
||||
@@ -89,6 +89,15 @@ class FiltersMatcherTest extends \PHPUnit_Framework_TestCase
|
||||
$filterList = [$filter];
|
||||
$this->assertTrue($this->object->match($email, $filterList));
|
||||
|
||||
$email = new \Espo\Entities\Email($this->emailDefs);
|
||||
$email->set('from', 'test@tester');
|
||||
$filter = new \Espo\Entities\EmailFilter($this->filterDefs);
|
||||
$filter->set(array(
|
||||
'from' => '*@tester'
|
||||
));
|
||||
$filterList = [$filter];
|
||||
$this->assertTrue($this->object->match($email, $filterList));
|
||||
|
||||
$email->set('from', 'test@tester');
|
||||
$email->set('to', 'test@tester;baraka@tester');
|
||||
$filter = new \Espo\Entities\EmailFilter($this->filterDefs);
|
||||
@@ -98,6 +107,15 @@ class FiltersMatcherTest extends \PHPUnit_Framework_TestCase
|
||||
$filterList = [$filter];
|
||||
$this->assertTrue($this->object->match($email, $filterList));
|
||||
|
||||
$email->set('from', 'test@tester');
|
||||
$email->set('to', 'test@tester;baraka@man');
|
||||
$filter = new \Espo\Entities\EmailFilter($this->filterDefs);
|
||||
$filter->set(array(
|
||||
'to' => '*@tester'
|
||||
));
|
||||
$filterList = [$filter];
|
||||
$this->assertTrue($this->object->match($email, $filterList));
|
||||
|
||||
$email->set('subject', 'test hello man');
|
||||
$filter = new \Espo\Entities\EmailFilter($this->filterDefs);
|
||||
$filter->set(array(
|
||||
|
||||
Reference in New Issue
Block a user