Skip to content

Commit 6e8331e

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents f2bcca3 + 053b2a9 commit 6e8331e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Core/Controller/Myfiles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static function isFileSafe(string $filePath): bool
7676
$parts = explode('.', $filePath);
7777
$safe = [
7878
'7z', 'accdb', 'ai', 'avi', 'cdr', 'css', 'csv', 'doc', 'docx', 'dxf', 'dwg', 'eot', 'gif', 'gz', 'html',
79-
'ico', 'ics', 'jfif', 'jpeg', 'jpg', 'js', 'json', 'map', 'md', 'mdb', 'mkv', 'mov', 'mp3', 'mp4', 'ndg',
79+
'ico', 'ics', 'jfif', 'jpeg', 'jpg', 'js', 'json', 'lbx', 'map', 'md', 'mdb', 'mkv', 'mov', 'mp3', 'mp4', 'ndg',
8080
'ods', 'odt', 'ogg', 'pdf', 'png', 'pptx', 'rar', 'sql', 'step', 'svg', 'ttf', 'txt', 'webm', 'webp',
8181
'woff', 'woff2', 'xls', 'xlsm', 'xlsx', 'xml', 'xsig', 'zip'
8282
];

Core/Controller/SendMail.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ protected function loadDataDefault($model): void
194194
];
195195
if ($notificationModel->loadWhere($where)) {
196196
// hemos encontrado una notificación, usamos su asunto y cuerpo
197-
$shortCodes = ['{code}', '{name}', '{date}', '{total}', '{number2}'];
198-
$shortValues = [$model->codigo, '', $model->fecha, $model->total, ''];
197+
$shortCodes = ['{code}', '{name}', '{date}', '{total}', '{number2}', '{contact_name}', '{contact_surname}'];
198+
$shortValues = [$model->codigo, '', $model->fecha, $model->total, '', '', ''];
199199

200200
$shortValues[1] = $model->hasColumn('nombrecliente')
201201
? $model->nombrecliente
@@ -205,6 +205,11 @@ protected function loadDataDefault($model): void
205205
? $model->numero2
206206
: $model->numproveedor;
207207

208+
if($model->hasColumn('idcontactofact') && $contacto = Contacto::find($model->idcontactofact)){
209+
$shortValues[5] = $contacto->nombre;
210+
$shortValues[6] = $contacto->apellidos;
211+
}
212+
208213
$subject = str_replace($shortCodes, $shortValues, $notificationModel->subject);
209214
$body = str_replace($shortCodes, $shortValues, $notificationModel->body);
210215
} else {

0 commit comments

Comments
 (0)