mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-11 09:00:42 +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);
|
$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));
|
$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));
|
$dbo->query('UPDATE mg_articoli SET contenuto = \'\' WHERE id='.prepare($id_record));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upload file
|
// Upload file
|
||||||
|
@ -28,7 +28,6 @@ if (!empty($additionals)) {
|
|||||||
</button>
|
</button>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
|
|
||||||
if ($editable) {
|
if ($editable) {
|
||||||
echo '
|
echo '
|
||||||
<a class="btn btn-danger ask pull-right" data-backto="record-edit" data-op="delete_filter" data-id="'.$additional['id'].'">
|
<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';
|
include_once __DIR__.'/../core.php';
|
||||||
|
|
||||||
if (count($notes)>0) {
|
if (count($notes) > 0) {
|
||||||
echo '
|
echo '
|
||||||
<div class="box box-info direct-chat direct-chat-info">
|
<div class="box box-info direct-chat direct-chat-info">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
|
@ -10,7 +10,7 @@ use Uploads;
|
|||||||
class EmailNotification extends PHPMailer implements NotificationInterface
|
class EmailNotification extends PHPMailer implements NotificationInterface
|
||||||
{
|
{
|
||||||
protected $mail;
|
protected $mail;
|
||||||
protected $attachments = [];
|
protected $directory;
|
||||||
|
|
||||||
protected $infos = [];
|
protected $infos = [];
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ class EmailNotification extends PHPMailer implements NotificationInterface
|
|||||||
$this->SmtpClose();
|
$this->SmtpClose();
|
||||||
|
|
||||||
// Pulizia file generati
|
// Pulizia file generati
|
||||||
delete(DOCROOT.'/files/notifications/');
|
delete($this->getTempDirectory());
|
||||||
|
|
||||||
// Segnalazione degli errori
|
// Segnalazione degli errori
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
@ -225,7 +225,7 @@ class EmailNotification extends PHPMailer implements NotificationInterface
|
|||||||
$print = Prints::get($print);
|
$print = Prints::get($print);
|
||||||
|
|
||||||
// Utilizzo di una cartella particolare per il salvataggio temporaneo degli allegati
|
// 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);
|
$info = Prints::render($print['id'], $id_record, $path);
|
||||||
$name = $name ?: $info['name'];
|
$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