From 61957e628b9e521972337ac6eeb475d49cd2fdf7 Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 21 Oct 2015 10:07:15 +0300 Subject: [PATCH 1/4] fix optOut --- application/Espo/Modules/Crm/EntryPoints/Unsubscribe.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/application/Espo/Modules/Crm/EntryPoints/Unsubscribe.php b/application/Espo/Modules/Crm/EntryPoints/Unsubscribe.php index 092bd6d89e..bf5ac1252b 100644 --- a/application/Espo/Modules/Crm/EntryPoints/Unsubscribe.php +++ b/application/Espo/Modules/Crm/EntryPoints/Unsubscribe.php @@ -75,11 +75,8 @@ class Unsubscribe extends \Espo\Core\EntryPoints\Base $link = $m[$target->getEntityType()]; } if ($link) { - if ($campaign) { - $targetListList = $campaign->get('targetLists'); - } else { - $targetListList = $massEmail->get('targetLists'); - } + $targetListList = $massEmail->get('targetLists'); + foreach ($targetListList as $targetList) { $this->getEntityManager()->getRepository('TargetList')->updateRelation($targetList, $link, $target->id, array( 'optedOut' => true From 1bd5eac103c0bb0787d420643851bcb931e9610e Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 21 Oct 2015 10:09:21 +0300 Subject: [PATCH 2/4] ver --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b45f9b9959..e8da8b662b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "espocrm", - "version": "3.7.3", + "version": "3.7.4", "description": "", "main": "index.php", "repository": { From bb5d5a0ccf0f5643b62406126437013239519490 Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 21 Oct 2015 17:14:57 +0300 Subject: [PATCH 3/4] text filter default search by email address --- .../Modules/Crm/Resources/metadata/entityDefs/Contact.json | 3 ++- .../Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json index 6487bd6ba2..274a2cdb38 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json @@ -238,7 +238,8 @@ }, "collection": { "sortBy": "name", - "asc": true + "asc": true, + "textFilterFields": ["name", "emailAddress"] }, "indexes": { "firstName": { diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json index d67fa05b3a..b735d875e4 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json @@ -255,7 +255,7 @@ "collection": { "sortBy": "createdAt", "asc": false, - "textFilterFields": ["name", "accountName"] + "textFilterFields": ["name", "accountName", "emailAddress"] }, "indexes": { "firstName": { From 0a0f8da2f4f8fac0e26ca43959c15ded39e93a06 Mon Sep 17 00:00:00 2001 From: yuri Date: Thu, 22 Oct 2015 10:41:07 +0300 Subject: [PATCH 4/4] fix auth for 5.5 --- application/Espo/Core/Utils/Api/Auth.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/Espo/Core/Utils/Api/Auth.php b/application/Espo/Core/Utils/Api/Auth.php index bb4e66c4e5..b49011b454 100644 --- a/application/Espo/Core/Utils/Api/Auth.php +++ b/application/Espo/Core/Utils/Api/Auth.php @@ -55,7 +55,10 @@ class Auth extends \Slim\Middleware } $espoCgiAuth = $req->headers('HTTP_ESPO_CGI_AUTH'); - if ( !isset($authUsername) && !isset($authPassword) && !empty($espoCgiAuth) ) { + if (empty($espoCgiAuth)) { + $espoCgiAuth = $req->headers('REDIRECT_HTTP_ESPO_CGI_AUTH'); + } + if (!isset($authUsername) && !isset($authPassword) && !empty($espoCgiAuth)) { list($authUsername, $authPassword) = explode(':' , base64_decode(substr($espoCgiAuth, 6))); }