mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-23 13:58:25 +01:00
Fix eliminazione file non usati
This commit is contained in:
parent
80e332a7c6
commit
5c32995a6f
@ -80,21 +80,12 @@ $files = [
|
||||
'templates/pdfgen.php',
|
||||
'templates/interventi/intervento_body.html',
|
||||
'templates/interventi/intervento.html',
|
||||
'templates/interventi/pdfgen.interventiphp',
|
||||
'templates/ddt/ddt_body.html',
|
||||
'templates/ddt/ddt.html',
|
||||
'templates/ddt/pdfgen.ddt',
|
||||
'templates/ordini/ordini_body.html',
|
||||
'templates/ordini/ordini.html',
|
||||
'templates/ordini/pdfgen.ordini',
|
||||
'templates/fatture/fatture_body.html',
|
||||
'templates/fatture/fatture.html',
|
||||
'templates/fatture/pdfgen.fatture.php',
|
||||
'templates/contratti/contratti_body.html',
|
||||
'templates/contratti/contratti.html',
|
||||
'templates/contratti/pdfgen.contratti.php',
|
||||
'templates/preventivi/preventivi_body.html',
|
||||
'templates/preventivi/preventivi.html',
|
||||
'templates/preventivi/pdfgen.preventivi.php',
|
||||
'templates/preventivi_cons/preventivo_body.html',
|
||||
'templates/preventivi_cons/preventivo.html',
|
||||
@ -117,7 +108,7 @@ $files = [
|
||||
];
|
||||
|
||||
foreach ($files as $key => $value) {
|
||||
$files[$key] = realpath($docroot.'/'.$value);
|
||||
$files[$key] = realpath(DOCROOT.'/'.$value);
|
||||
}
|
||||
|
||||
delete($files);
|
||||
@ -164,6 +155,6 @@ $dirs = [
|
||||
$pieces = array_chunk($dirs, 5);
|
||||
|
||||
foreach ($pieces as $piece) {
|
||||
$files = glob($docroot.'/modules/{'.implode(',', $piece).'}/*.html', GLOB_BRACE);
|
||||
$files = glob(DOCROOT.'/modules/{'.implode(',', $piece).'}/*.html', GLOB_BRACE);
|
||||
delete($files);
|
||||
}
|
||||
|
24
update/2_3_1.php
Normal file
24
update/2_3_1.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Rimozione file e cartelle deprecati
|
||||
*/
|
||||
|
||||
// File e cartelle deprecate
|
||||
$files = [
|
||||
'templates/interventi/pdfgen.interventi.php',
|
||||
'templates/ddt/pdfgen.ddt.php',
|
||||
'templates/ordini/pdfgen.ordini.php',
|
||||
'templates/fatture/fattura_body.html',
|
||||
'templates/fatture/fattura.html',
|
||||
'templates/contratti/contratto_body.html',
|
||||
'templates/contratti/contratto.html',
|
||||
'templates/preventivo/preventivo_body.html',
|
||||
'templates/preventivo/preventivo.html',
|
||||
];
|
||||
|
||||
foreach ($files as $key => $value) {
|
||||
$files[$key] = realpath(DOCROOT.'/'.$value);
|
||||
}
|
||||
|
||||
delete($files);
|
Loading…
Reference in New Issue
Block a user