1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-22 13:26:38 +01:00
openstamanager/update/2_4.php

58 lines
1.6 KiB
PHP
Raw Normal View History

<?php
/*
* Inserimento valori di default
*/
// Permessi di default delle viste
$gruppi = $database->fetchArray('SELECT `id` FROM `zz_groups`');
$results = $database->fetchArray('SELECT `id` FROM `zz_views` WHERE `id` NOT IN (SELECT `id_vista` FROM `zz_group_view`)');
$array = [];
foreach ($results as $result) {
foreach ($gruppi as $gruppo) {
$array[] = [
'id_gruppo' => $gruppo['id'],
'id_vista' => $result['id'],
];
}
}
if (!empty($array)) {
$database->insert('zz_group_view', $array);
}
/*
* Rimozione file e cartelle deprecati
*/
// File e cartelle deprecate
$files = [
2018-02-14 12:27:57 +01:00
'ajax_autocomplete.php',
'assets/dist/viewerjs',
'assets/dist/js/adapters',
'assets/dist/js/lang',
'assets/dist/js/skins',
'assets/dist/js/ckeditor.js',
'assets/dist/js/styles.js',
'lib/actions.php',
'lib/htmlbuilder.php',
'lib/modulebuilder.php',
'lib/permissions_check.php',
'lib/user_check.php',
2018-02-22 12:35:22 +01:00
'src/Widgets.php',
'templates/fatture_accompagnatorie/fattura_body.html',
'templates/fatture_accompagnatorie/fattura.html',
'templates/fatture_accompagnatorie/pdfgen.fatture_accompagnatorie.php',
'templates/fatture_accompagnatorie/logo_azienda.jpg',
'templates/riepilogo_contratti/contratto_body.html',
'templates/riepilogo_contratti/contratto.html',
'templates/riepilogo_contratti/pdfgen.riepilogo_contratti.php',
'templates/riepilogo_contratti/logo_azienda.jpg',
];
foreach ($files as $key => $value) {
$files[$key] = realpath($docroot.'/'.$value);
}
delete($files);