mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-24 14:31:42 +01:00
Sposto fisicamente i file allegati per i promemoria in fase di pianificazione intervento
This commit is contained in:
parent
0ecf1b931f
commit
f716aab59b
@ -276,15 +276,16 @@ switch (post('op')) {
|
||||
$rs_allegati = $dbo->fetchArray('SELECT filename FROM zz_files WHERE id_record = '.$id_record.' AND id_module = '.$id_module);
|
||||
foreach ($rs_allegati as $rs_allegato) {
|
||||
|
||||
$from_dir = $docroot.'/files';
|
||||
$to_dir = $docroot.'/files/'.Modules::get('Interventi')['directory'];
|
||||
$from_dir = '/'.Uploads::getUploadDirectory(Modules::get('Contratti')['id'], Plugins::get('Pianificazione interventi')['id']);
|
||||
$to_dir = '/'.Uploads::getUploadDirectory(Modules::get('Interventi')['id']);
|
||||
|
||||
if (move_uploaded_file($from_dir.'/'.$rs_allegato['filename'] , $to_dir.'/'.$rs_allegato['filename'])) {
|
||||
|
||||
} else {
|
||||
$_SESSION['warnings'][] = tr('Errore durante la copia del file da _FROM_ a _TO_', [
|
||||
$_SESSION['warnings'][] = tr('Errore durante la copia del file da _FROM_ a _TO_ per il file _FILE_.', [
|
||||
'_FROM_' => $from_dir,
|
||||
'_TO_' => $to_dir,
|
||||
'_FILE_' => $rs_allegato['filename'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ class FileManager implements ManagerInterface
|
||||
<tr>
|
||||
<td align="left">
|
||||
<a href="'.ROOTDIR.'/'.$directory.'/'.$r['filename'].'" target="_blank">
|
||||
<i class="fa fa-external-link"></i> '.$r['nome'].$directory.'
|
||||
<i class="fa fa-external-link"></i> '.$r['nome'].'
|
||||
</a>
|
||||
</td>
|
||||
<td>'.\Translator::timestampToLocale($r['created_at']).'</td>
|
||||
|
Loading…
Reference in New Issue
Block a user