mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-23 06:47:40 +01:00
Fix automatico per i percorsi delle stampe
Spostata l'eliminazione dei file deprecati della versione 2.3 nella versione 2.3.1 per risolvere automaticamente il problema sull'interpretazione delle stampe causato dalla mancata cancellazione dei file.
This commit is contained in:
parent
5c32995a6f
commit
75141b0eab
102
update/2_3.php
102
update/2_3.php
@ -56,105 +56,5 @@ $database->query('UPDATE `zz_files` SET `created_at` = `data`');
|
||||
$database->query('ALTER TABLE `zz_files` DROP `data`');
|
||||
|
||||
/*
|
||||
* Rimozione file e cartelle deprecati
|
||||
* Rimozione file e cartelle deprecati [in 2.3.1 per risolvere un problema sui percorsi]
|
||||
*/
|
||||
|
||||
// File e cartelle deprecate
|
||||
$files = [
|
||||
'lib/jscripts',
|
||||
'lib/html2pdf',
|
||||
'widgets',
|
||||
'share',
|
||||
'lib/class.phpmailer.php',
|
||||
'lib/class.pop3.php',
|
||||
'lib/class.smtp.php',
|
||||
'lib/PHPMailerAutoload.php',
|
||||
'lib/dbo.class.php',
|
||||
'lib/html-helpers.class.php',
|
||||
'lib/photo.class.php',
|
||||
'lib/widgets.class.php',
|
||||
'modules/anagrafiche/plugins/sedi.php',
|
||||
'modules/anagrafiche/plugins/referenti.php',
|
||||
'modules/ddt/plugins/ddt.anagrafiche.php',
|
||||
'modules/my_impianti/plugins/my_impianti.anagrafiche.php',
|
||||
'templates/pdfgen.php',
|
||||
'templates/interventi/intervento_body.html',
|
||||
'templates/interventi/intervento.html',
|
||||
'templates/ddt/ddt_body.html',
|
||||
'templates/ddt/ddt.html',
|
||||
'templates/ordini/ordini_body.html',
|
||||
'templates/ordini/ordini.html',
|
||||
'templates/fatture/pdfgen.fatture.php',
|
||||
'templates/contratti/pdfgen.contratti.php',
|
||||
'templates/preventivi/pdfgen.preventivi.php',
|
||||
'templates/preventivi_cons/preventivo_body.html',
|
||||
'templates/preventivi_cons/preventivo.html',
|
||||
'templates/preventivi_cons/pdfgen.preventivi_cons.php',
|
||||
'templates/contratti_cons/contratto_body.html',
|
||||
'templates/contratti_cons/contratto.html',
|
||||
'templates/contratti_cons/pdfgen.contratti_cons.php',
|
||||
'update/install_2.0.sql',
|
||||
'update/update_2.1.sql',
|
||||
'update/update_2.1.php',
|
||||
'update/update_2.2.sql',
|
||||
'update/update_2.2.php',
|
||||
'update/update_checker.php',
|
||||
'permissions.php',
|
||||
'settings.php',
|
||||
'addgroup.php',
|
||||
'adduser.php',
|
||||
'change_pwd.php',
|
||||
'README',
|
||||
];
|
||||
|
||||
foreach ($files as $key => $value) {
|
||||
$files[$key] = realpath(DOCROOT.'/'.$value);
|
||||
}
|
||||
|
||||
delete($files);
|
||||
|
||||
// File .html dei moduli di default
|
||||
// Per un problema sulla lunghezza massima del path su glob è necessario dividere le cartelle dei moduli di default da pulire
|
||||
$dirs = [
|
||||
'aggiornamenti',
|
||||
'anagrafiche',
|
||||
'articoli',
|
||||
'automezzi',
|
||||
'backup',
|
||||
'beni',
|
||||
'categorie',
|
||||
'causali',
|
||||
'contratti',
|
||||
'dashboard',
|
||||
'ddt',
|
||||
'fatture',
|
||||
'gestione_componenti',
|
||||
'interventi',
|
||||
'iva',
|
||||
'listini',
|
||||
'misure',
|
||||
'my_impianti',
|
||||
'opzioni',
|
||||
'ordini',
|
||||
'pagamenti',
|
||||
'partitario',
|
||||
'porti',
|
||||
'preventivi',
|
||||
'primanota',
|
||||
'scadenzario',
|
||||
'stati_intervento',
|
||||
'tecnici_tariffe',
|
||||
'tipi_anagrafiche',
|
||||
'tipi_intervento',
|
||||
'utenti',
|
||||
'viste',
|
||||
'voci_servizio',
|
||||
'zone',
|
||||
];
|
||||
|
||||
$pieces = array_chunk($dirs, 5);
|
||||
|
||||
foreach ($pieces as $piece) {
|
||||
$files = glob(DOCROOT.'/modules/{'.implode(',', $piece).'}/*.html', GLOB_BRACE);
|
||||
delete($files);
|
||||
}
|
||||
|
106
update/2_3_1.php
106
update/2_3_1.php
@ -1,7 +1,111 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Rimozione file e cartelle deprecati
|
||||
* Rimozione file e cartelle deprecati [da 2.3]
|
||||
*/
|
||||
|
||||
// File e cartelle deprecate
|
||||
$files = [
|
||||
'permissions.php',
|
||||
'settings.php',
|
||||
'addgroup.php',
|
||||
'adduser.php',
|
||||
'change_pwd.php',
|
||||
'README',
|
||||
'widgets',
|
||||
'share',
|
||||
'lib/jscripts',
|
||||
'lib/html2pdf',
|
||||
'lib/class.phpmailer.php',
|
||||
'lib/class.pop3.php',
|
||||
'lib/class.smtp.php',
|
||||
'lib/PHPMailerAutoload.php',
|
||||
'lib/dbo.class.php',
|
||||
'lib/html-helpers.class.php',
|
||||
'lib/photo.class.php',
|
||||
'lib/widgets.class.php',
|
||||
'modules/anagrafiche/plugins/sedi.php',
|
||||
'modules/anagrafiche/plugins/referenti.php',
|
||||
'modules/ddt/plugins/ddt.anagrafiche.php',
|
||||
'modules/my_impianti/plugins/my_impianti.anagrafiche.php',
|
||||
'templates/pdfgen.php',
|
||||
'templates/interventi/intervento_body.html',
|
||||
'templates/interventi/intervento.html',
|
||||
'templates/ddt/ddt_body.html',
|
||||
'templates/ddt/ddt.html',
|
||||
'templates/ordini/ordini_body.html',
|
||||
'templates/ordini/ordini.html',
|
||||
'templates/fatture/pdfgen.fatture.php',
|
||||
'templates/contratti/pdfgen.contratti.php',
|
||||
'templates/preventivi/pdfgen.preventivi.php',
|
||||
'templates/preventivi_cons/preventivo_body.html',
|
||||
'templates/preventivi_cons/preventivo.html',
|
||||
'templates/preventivi_cons/pdfgen.preventivi_cons.php',
|
||||
'templates/contratti_cons/contratto_body.html',
|
||||
'templates/contratti_cons/contratto.html',
|
||||
'templates/contratti_cons/pdfgen.contratti_cons.php',
|
||||
'update/install_2.0.sql',
|
||||
'update/update_2.1.sql',
|
||||
'update/update_2.1.php',
|
||||
'update/update_2.2.sql',
|
||||
'update/update_2.2.php',
|
||||
'update/update_checker.php',
|
||||
];
|
||||
|
||||
foreach ($files as $key => $value) {
|
||||
$files[$key] = realpath(DOCROOT.'/'.$value);
|
||||
}
|
||||
|
||||
delete($files);
|
||||
|
||||
// File .html dei moduli di default
|
||||
// Per un problema sulla lunghezza massima del path su glob è necessario dividere le cartelle dei moduli di default da pulire
|
||||
$dirs = [
|
||||
'aggiornamenti',
|
||||
'anagrafiche',
|
||||
'articoli',
|
||||
'automezzi',
|
||||
'backup',
|
||||
'beni',
|
||||
'categorie',
|
||||
'causali',
|
||||
'contratti',
|
||||
'dashboard',
|
||||
'ddt',
|
||||
'fatture',
|
||||
'gestione_componenti',
|
||||
'interventi',
|
||||
'iva',
|
||||
'listini',
|
||||
'misure',
|
||||
'my_impianti',
|
||||
'opzioni',
|
||||
'ordini',
|
||||
'pagamenti',
|
||||
'partitario',
|
||||
'porti',
|
||||
'preventivi',
|
||||
'primanota',
|
||||
'scadenzario',
|
||||
'stati_intervento',
|
||||
'tecnici_tariffe',
|
||||
'tipi_anagrafiche',
|
||||
'tipi_intervento',
|
||||
'utenti',
|
||||
'viste',
|
||||
'voci_servizio',
|
||||
'zone',
|
||||
];
|
||||
|
||||
$pieces = array_chunk($dirs, 5);
|
||||
|
||||
foreach ($pieces as $piece) {
|
||||
$files = glob(DOCROOT.'/modules/{'.implode(',', $piece).'}/*.html', GLOB_BRACE);
|
||||
delete($files);
|
||||
}
|
||||
|
||||
/*
|
||||
* Rimozione file e cartelle deprecati [2.3.1]
|
||||
*/
|
||||
|
||||
// File e cartelle deprecate
|
||||
|
Loading…
x
Reference in New Issue
Block a user