solved conflict composer.lock, config/app.php, workflow/engine/classes/SpoolRun.php

This commit is contained in:
Ronald Q
2019-07-11 10:23:48 -04:00
parent d421048dc8
commit 65c4922619
3 changed files with 2047 additions and 1553 deletions

3511
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,24 +9,23 @@ return [
'url' => env('APP_URL', 'http://localhost'), 'url' => env('APP_URL', 'http://localhost'),
'env' => env('APP_ENV', 'production'), 'env' => env('APP_ENV', 'production'),
'debug' => env('APP_DEBUG', false), 'debug' => env('APP_DEBUG', false),
'log' => env('APP_LOG', 'single'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
'cache_lifetime' => env('APP_CACHE_LIFETIME', 60), 'cache_lifetime' => env('APP_CACHE_LIFETIME', 60),
'key' => env('APP_KEY', 'base64:rU28h/tElUn/eiLY0qC24jJq1rakvAFRoRl1DWxj/kM='), 'key' => env('APP_KEY', 'base64:rU28h/tElUn/eiLY0qC24jJq1rakvAFRoRl1DWxj/kM='),
'cipher' => 'AES-256-CBC', 'cipher' => 'AES-256-CBC',
'timezone' => 'UTC', 'timezone' => 'UTC',
'providers' => [ 'providers' => [
CacheServiceProvider::class,
FilesystemServiceProvider::class, FilesystemServiceProvider::class,
CacheServiceProvider::class,
ViewServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class, Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class, Illuminate\Encryption\EncryptionServiceProvider::class,
Laravel\Tinker\TinkerServiceProvider::class, Laravel\Tinker\TinkerServiceProvider::class,
ViewServiceProvider::class, Illuminate\Notifications\NotificationServiceProvider::class,
], ],
'aliases' => [ 'aliases' => [
'Crypt' => Illuminate\Support\Facades\Crypt::class 'Crypt' => Illuminate\Support\Facades\Crypt::class
], ],

View File

@@ -91,6 +91,16 @@ class SpoolRun
$this->appMsgUid = $v; $this->appMsgUid = $v;
} }
/**
* Get the fileData property
*
* @return array
*/
public function getFileData()
{
return $this->fileData;
}
/** /**
* Set the $spoolId * Set the $spoolId
* *
@@ -232,32 +242,52 @@ class SpoolRun
} }
/** /**
* set email parameters * Set email parameters
* *
* @param string $sAppMsgUid , $sSubject, $sFrom, $sTo, $sBody, $sDate, $sCC, $sBCC, $sTemplate * @param string $appMsgUid
* @return none * @param string $subject
* @param string $from
* @param string $to
* @param string $body
* @param string $date
* @param string $cc
* @param string $bcc
* @param string $template
* @param array $attachments
* @param bool $contentTypeIsHtml
* @param string $error
*
* @see SpoolRun->create()
* @see SpoolRun->resendEmails()
*/ */
public function setData($sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate = "", $sCC = "", $sBCC = "", $sTemplate = "", $aAttachment = array(), $bContentTypeIsHtml = true, $sError = "") public function setData($appMsgUid, $subject, $from, $to, $body, $date = '', $cc = '', $bcc = '', $template = '', $attachments = [],
$contentTypeIsHtml = true, $error = '')
{ {
$this->spoolId = $sAppMsgUid; // Fill "fileData" property
$this->fileData['subject'] = $sSubject; $this->spoolId = $appMsgUid;
$this->fileData['from'] = $sFrom; $this->fileData['subject'] = $subject;
$this->fileData['to'] = $sTo; $this->fileData['from'] = $from;
$this->fileData['body'] = $sBody; $this->fileData['to'] = $to;
$this->fileData['date'] = ($sDate != '' ? $sDate : date('Y-m-d H:i:s')); $this->fileData['body'] = $body;
$this->fileData['cc'] = $sCC; $this->fileData['date'] = (!empty($date) ? $date : date('Y-m-d H:i:s'));
$this->fileData['bcc'] = $sBCC; $this->fileData['cc'] = $cc;
$this->fileData['template'] = $sTemplate; $this->fileData['bcc'] = $bcc;
$this->fileData['attachments'] = $aAttachment; $this->fileData['template'] = $template;
$this->fileData['envelope_to'] = array(); $this->fileData['attachments'] = $attachments;
$this->fileData["contentTypeIsHtml"] = $bContentTypeIsHtml; $this->fileData["contentTypeIsHtml"] = $contentTypeIsHtml;
$this->fileData["error"] = $sError; $this->fileData["error"] = $error;
// Initialize some values used internally
$this->fileData['envelope_to'] = [];
$this->fileData['envelope_cc'] = [];
$this->fileData['envelope_bcc'] = [];
// Domain validation when the email engine is "OpenMail"
if (array_key_exists('MESS_ENGINE', $this->config)) { if (array_key_exists('MESS_ENGINE', $this->config)) {
if ($this->config['MESS_ENGINE'] == 'OPENMAIL') { if ($this->config['MESS_ENGINE'] === 'OPENMAIL') {
if ($this->config['MESS_SERVER'] != '') { if (!empty($this->config['MESS_SERVER'])) {
if (($sAux = @gethostbyaddr($this->config['MESS_SERVER']))) { if (($domain = @gethostbyaddr($this->config['MESS_SERVER']))) {
$this->fileData['domain'] = $sAux; $this->fileData['domain'] = $domain;
} else { } else {
$this->fileData['domain'] = $this->config['MESS_SERVER']; $this->fileData['domain'] = $this->config['MESS_SERVER'];
} }
@@ -841,4 +871,12 @@ class SpoolRun
return $appMsgUid; return $appMsgUid;
} }
/**
* Run the private method "handleEnvelopeTo", this method was created in order to use in the unit tests
*/
public function runHandleEnvelopeTo()
{
$this->handleEnvelopeTo();
}
} }