mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-29 07:02:41 +01:00
Possibile bugfix allegati email
This commit is contained in:
parent
adf3aa0b58
commit
609368aa33
@ -97,9 +97,8 @@ switch (post('op')) {
|
||||
$contenuto = \Util\Ini::write(file_get_contents(DOCROOT.'/files/my_impianti/'.$componente), $post);
|
||||
|
||||
$dbo->query('UPDATE mg_articoli SET contenuto='.prepare($contenuto).' WHERE id='.prepare($id_record));
|
||||
}else{
|
||||
} else {
|
||||
$dbo->query('UPDATE mg_articoli SET contenuto = \'\' WHERE id='.prepare($id_record));
|
||||
|
||||
}
|
||||
|
||||
// Upload file
|
||||
|
@ -28,7 +28,6 @@ if (!empty($additionals)) {
|
||||
</button>
|
||||
</div>';
|
||||
|
||||
|
||||
if ($editable) {
|
||||
echo '
|
||||
<a class="btn btn-danger ask pull-right" data-backto="record-edit" data-op="delete_filter" data-id="'.$additional['id'].'">
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
include_once __DIR__.'/../core.php';
|
||||
|
||||
if (count($notes)>0) {
|
||||
if (count($notes) > 0) {
|
||||
echo '
|
||||
<div class="box box-info direct-chat direct-chat-info">
|
||||
<div class="box-header with-border">
|
||||
|
@ -10,7 +10,7 @@ use Uploads;
|
||||
class EmailNotification extends PHPMailer implements NotificationInterface
|
||||
{
|
||||
protected $mail;
|
||||
protected $attachments = [];
|
||||
protected $directory;
|
||||
|
||||
protected $infos = [];
|
||||
|
||||
@ -168,7 +168,7 @@ class EmailNotification extends PHPMailer implements NotificationInterface
|
||||
$this->SmtpClose();
|
||||
|
||||
// Pulizia file generati
|
||||
delete(DOCROOT.'/files/notifications/');
|
||||
delete($this->getTempDirectory());
|
||||
|
||||
// Segnalazione degli errori
|
||||
if (!$result) {
|
||||
@ -225,7 +225,7 @@ class EmailNotification extends PHPMailer implements NotificationInterface
|
||||
$print = Prints::get($print);
|
||||
|
||||
// Utilizzo di una cartella particolare per il salvataggio temporaneo degli allegati
|
||||
$path = DOCROOT.'/files/notifications/'.rand(0, 999);
|
||||
$path = $this->getTempDirectory();
|
||||
|
||||
$info = Prints::render($print['id'], $id_record, $path);
|
||||
$name = $name ?: $info['name'];
|
||||
@ -262,4 +262,15 @@ class EmailNotification extends PHPMailer implements NotificationInterface
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function getTempDirectory()
|
||||
{
|
||||
if (!isset($this->directory)) {
|
||||
$this->directory = DOCROOT.'/files/notifications/'.rand(0, 999);
|
||||
|
||||
directory($this->directory);
|
||||
}
|
||||
|
||||
return $this->directory;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user