1
0
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:
Thomas Zilio 2018-02-14 12:26:15 +01:00
parent 80e332a7c6
commit 5c32995a6f
2 changed files with 26 additions and 11 deletions

View File

@ -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
View 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);