From 814f07644b8a0fb58d566266c438c7f43bd0d0df Mon Sep 17 00:00:00 2001 From: Mariusz Krzaczkowski Date: Wed, 23 Oct 2019 11:49:13 +0200 Subject: [PATCH 1/3] Improvements to email search --- plugins/yetiforce/yetiforce.php | 4 ++-- version.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/yetiforce/yetiforce.php b/plugins/yetiforce/yetiforce.php index 367f4bb4..2ace1737 100644 --- a/plugins/yetiforce/yetiforce.php +++ b/plugins/yetiforce/yetiforce.php @@ -262,8 +262,8 @@ public function messageComposeHead($args) chdir($this->rc->config->get('root_directory')); $this->loadCurrentUser(); - $subjectNumber = \App\Fields\Email::findRecordNumber($subject, $params['crmmodule']); - $recordNumber = \App\Fields\Email::findRecordNumber("[{$params['recordNumber']}]", $params['crmmodule']); + $subjectNumber = \App\Mail\RecordFinder::findByRecordNumber($subject, $params['crmmodule']); + $recordNumber = \App\Mail\RecordFinder::findByRecordNumber("[{$params['recordNumber']}]", $params['crmmodule']); if (false === $subject || (false !== $subject && $subjectNumber !== $recordNumber)) { $subject = "[{$params['recordNumber']}] $subject"; } diff --git a/version.php b/version.php index 783c4049..cf57d399 100644 --- a/version.php +++ b/version.php @@ -1,6 +1,6 @@ '2019.10.04', - 'version' => '0.0.81' + 'patch' => '2019.10.23', + 'version' => '0.0.82' ]; From 806bda4d6edfd86e5aa13d2b162799fd7be5867b Mon Sep 17 00:00:00 2001 From: Mariusz Krzaczkowski Date: Thu, 24 Oct 2019 12:28:11 +0200 Subject: [PATCH 2/3] Improvements to email search --- plugins/yetiforce/yetiforce.php | 4 ++-- version.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/yetiforce/yetiforce.php b/plugins/yetiforce/yetiforce.php index 2ace1737..7c34c377 100644 --- a/plugins/yetiforce/yetiforce.php +++ b/plugins/yetiforce/yetiforce.php @@ -262,8 +262,8 @@ public function messageComposeHead($args) chdir($this->rc->config->get('root_directory')); $this->loadCurrentUser(); - $subjectNumber = \App\Mail\RecordFinder::findByRecordNumber($subject, $params['crmmodule']); - $recordNumber = \App\Mail\RecordFinder::findByRecordNumber("[{$params['recordNumber']}]", $params['crmmodule']); + $subjectNumber = \App\Mail\RecordFinder::getRecordNumberFromString($subject, $params['crmmodule']); + $recordNumber = \App\Mail\RecordFinder::getRecordNumberFromString("[{$params['recordNumber']}]", $params['crmmodule']); if (false === $subject || (false !== $subject && $subjectNumber !== $recordNumber)) { $subject = "[{$params['recordNumber']}] $subject"; } diff --git a/version.php b/version.php index cf57d399..b2d9c783 100644 --- a/version.php +++ b/version.php @@ -1,6 +1,6 @@ '2019.10.23', - 'version' => '0.0.82' + 'patch' => '2019.10.24', + 'version' => '0.0.83' ]; From 134ee290e51bcd5f877710d04777b0a4472b28b5 Mon Sep 17 00:00:00 2001 From: Mariusz Krzaczkowski Date: Thu, 7 Nov 2019 08:35:11 +0100 Subject: [PATCH 3/3] Added minor improvement --- .gitattributes | 6 ++++++ program/steps/mail/autocomplete.inc | 6 +----- version.php | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitattributes b/.gitattributes index 17d5c942..be9c3816 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,3 +18,9 @@ *.yarnclean text eol=lf *.lock text eol=lf *.yarn-integrity text eol=lf + +.github/ export-ignore +tests/ export-ignore +.travis.yml export-ignore +.scrutinizer.yml export-ignore +.sensiolabs.yml export-ignore diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index 04e30dbb..2b07890c 100644 --- a/program/steps/mail/autocomplete.inc +++ b/program/steps/mail/autocomplete.inc @@ -16,11 +16,7 @@ if (strlen($search)) { $addressBookFile = $RCMAIL->config->get('root_directory') . 'cache/addressBook/mails_' . $crmUserId . '.php'; if (is_file($addressBookFile)) { include $addressBookFile; - foreach ($bookMails as $row) { - if (stripos($row, $search) !== false) { - $contacts[] = $row; - } - } + $contacts = preg_grep("/{$search}/i", $bookMails); } } } diff --git a/version.php b/version.php index b2d9c783..f4fdbf77 100644 --- a/version.php +++ b/version.php @@ -1,6 +1,6 @@ '2019.10.24', - 'version' => '0.0.83' + 'patch' => '2019.11.07', + 'version' => '0.0.84' ];