2022-03-02 13:38:15 +01:00
|
|
|
<?php
|
|
|
|
namespace Garradin;
|
|
|
|
use Garradin\Entities\Files\File;
|
|
|
|
|
|
|
|
// supprimer les fichiers créés
|
|
|
|
|
|
|
|
// signature par défaut
|
2022-03-03 12:09:52 +01:00
|
|
|
$default_signature_file = \Garradin\Files\Files::get('skel/plugin/recusfiscaux/default_signature.png');
|
2022-03-03 14:15:48 +01:00
|
|
|
if (null !== $default_signature_file) {
|
|
|
|
$default_signature_file->delete();
|
|
|
|
}
|
2022-03-02 13:38:15 +01:00
|
|
|
|
|
|
|
// signature réelle
|
2022-03-03 12:09:52 +01:00
|
|
|
$signature = $plugin->getConfig('signature');
|
|
|
|
if (null !== $signature) {
|
2022-03-03 14:15:48 +01:00
|
|
|
$sig_file = \Garradin\Files\Files::get($signature);
|
|
|
|
if (null !== $sig_file) {
|
|
|
|
$sig_file->delete();
|
|
|
|
}
|
2022-03-03 12:09:52 +01:00
|
|
|
}
|
2022-03-11 11:04:25 +01:00
|
|
|
unset($_SESSION['sig_file']);
|