small syntax fixes (#197)
* fix variable name * init $number variable * another fix
This commit is contained in:
@@ -233,6 +233,7 @@ class Importer
|
||||
$reference = str_replace(array('/', '@'), " ", trim($reference, '<>'));
|
||||
$parentType = $parentId = null;
|
||||
$emailSent = PHP_INT_MAX;
|
||||
$number = null;
|
||||
$n = sscanf($reference, '%s %s %d %d espo', $parentType, $parentId, $emailSent, $number);
|
||||
if ($n == 4 && $emailSent < time()) {
|
||||
if (!empty($parentType) && !empty($parentId)) {
|
||||
|
||||
@@ -45,7 +45,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB
|
||||
return;
|
||||
}
|
||||
|
||||
$eaRepositoty = $this->getEntityManager()->getRepository('EmailAddress');
|
||||
$eaRepository = $this->getEntityManager()->getRepository('EmailAddress');
|
||||
|
||||
$address = $entity->get($type);
|
||||
$idList = [];
|
||||
@@ -54,7 +54,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB
|
||||
return trim($e);
|
||||
}, explode(';', $address));
|
||||
|
||||
$idList = $eaRepositoty->getIdListFormAddressList($arr);
|
||||
$idList = $eaRepository->getIdListFormAddressList($arr);
|
||||
foreach ($idList as $id) {
|
||||
$this->addUserByEmailAddressId($entity, $id, $addAssignedUser);
|
||||
}
|
||||
@@ -124,7 +124,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB
|
||||
|
||||
protected function beforeSave(Entity $entity, array $options = array())
|
||||
{
|
||||
$eaRepositoty = $this->getEntityManager()->getRepository('EmailAddress');
|
||||
$eaRepository = $this->getEntityManager()->getRepository('EmailAddress');
|
||||
|
||||
if ($entity->has('attachmentsIds')) {
|
||||
$attachmentsIds = $entity->get('attachmentsIds');
|
||||
@@ -141,7 +141,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB
|
||||
if ($entity->has('from')) {
|
||||
$from = trim($entity->get('from'));
|
||||
if (!empty($from)) {
|
||||
$ids = $eaRepositoty->getIds(array($from));
|
||||
$ids = $eaRepository->getIds(array($from));
|
||||
if (!empty($ids)) {
|
||||
$entity->set('fromEmailAddressId', $ids[0]);
|
||||
$this->addUserByEmailAddressId($entity, $ids[0], true);
|
||||
|
||||
Reference in New Issue
Block a user