mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-23 20:30:51 +01:00
Gestione installazione da zip per i templates di stampa
This commit is contained in:
parent
155c318ad8
commit
f53a960faa
@ -52,7 +52,7 @@ if (file_exists($extraction_dir.'/VERSION')) {
|
||||
->ignoreVCS(true)
|
||||
->in($extraction_dir);
|
||||
|
||||
$files = $finder->name('MODULE')->name('PLUGIN');
|
||||
$files = $finder->name('MODULE')->name('PLUGIN')->name('TEMPLATES');
|
||||
|
||||
foreach ($files as $file) {
|
||||
// Informazioni dal file di configurazione
|
||||
@ -82,6 +82,18 @@ if (file_exists($extraction_dir.'/VERSION')) {
|
||||
$insert['position'] = $info['position'];
|
||||
}
|
||||
|
||||
// Templates
|
||||
elseif (basename($file->getRealPath()) == 'TEMPLATES') {
|
||||
$directory = 'templates';
|
||||
$table = 'zz_prints';
|
||||
|
||||
$installed = Prints::getPrints()[$info['name']];
|
||||
$insert['id_module'] = Modules::get($info['module'])['id'];
|
||||
$insert['is_record'] = $info['is_record'];
|
||||
$insert['filename'] = $info['filename'];
|
||||
$insert['icon'] = $info['icon'];
|
||||
}
|
||||
|
||||
// Copia dei file nella cartella relativa
|
||||
copyr(dirname($file->getRealPath()), base_dir().'/'.$directory.'/'.$info['directory']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user