1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 17:01:33 +02:00

Merge pull request #4712 from turbo124/v5-stable

V5.0.49
This commit is contained in:
David Bomba 2021-01-19 17:02:32 +11:00 committed by GitHub
commit 68b03e8de1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 4 deletions

View File

@ -37,6 +37,7 @@ jobs:
php artisan storage:link php artisan storage:link
sudo php artisan cache:clear sudo php artisan cache:clear
sudo find ./ -type f -exec chmod 644 {} \; sudo find ./ -type f -exec chmod 644 {} \;
sudo find ./vendor/bin/ -type f -exec chmod +x {} \;
sudo find ./ -type d -exec chmod 755 {} \; sudo find ./ -type d -exec chmod 755 {} \;
- name: Prepare JS/CSS assets - name: Prepare JS/CSS assets

View File

@ -1 +1 @@
5.0.48 5.0.49

View File

@ -44,6 +44,10 @@ class TemplateEngine
private $settings; private $settings;
private $raw_body;
private $raw_subject;
public function __construct($body, $subject, $entity, $entity_id, $template) public function __construct($body, $subject, $entity, $entity_id, $template)
{ {
$this->body = $body; $this->body = $body;
@ -121,6 +125,9 @@ class TemplateEngine
private function replaceValues() private function replaceValues()
{ {
$this->raw_body = $this->body;
$this->raw_subject = $this->subject;
if ($this->entity_obj) { if ($this->entity_obj) {
$this->entityValues($this->entity_obj->client->primary_contact()->first()); $this->entityValues($this->entity_obj->client->primary_contact()->first());
} else { } else {
@ -157,6 +164,7 @@ class TemplateEngine
$this->body = strtr($this->body, $data['values']); $this->body = strtr($this->body, $data['values']);
$this->body = str_replace("\n", "<br>", $this->body); $this->body = str_replace("\n", "<br>", $this->body);
$this->subject = strtr($this->subject, $data['labels']); $this->subject = strtr($this->subject, $data['labels']);
$this->subject = strtr($this->subject, $data['values']); $this->subject = strtr($this->subject, $data['values']);
@ -197,9 +205,10 @@ class TemplateEngine
'subject' => $this->subject, 'subject' => $this->subject,
'body' => $this->body, 'body' => $this->body,
'wrapper' => $wrapper, 'wrapper' => $wrapper,
'raw_body' => $this->raw_body,
'raw_subject' => $this->raw_subject
]; ];
$this->tearDown(); $this->tearDown();
return $data; return $data;

View File

@ -13,7 +13,7 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', ''), 'app_domain' => env('APP_DOMAIN', ''),
'app_version' => '5.0.48', 'app_version' => '5.0.49',
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false), 'api_secret' => env('API_SECRET', false),