From 8d23e05d14e1357c158614cc23dd26b6368996cb Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 28 Nov 2022 11:44:56 +0100 Subject: [PATCH] Fix creazione manifest.json altre fix minori --- gulpfile.js | 8 +++++-- include/init/configuration.php | 42 ++++++++++++++++++---------------- package.json | 2 +- 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index e487e3404..a69b4e2f0 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -124,7 +124,9 @@ const JS = gulp.parallel(() => { vendor[i] = config.nodeDirectory + '/' + vendor[i]; } - return gulp.src(vendor) + return gulp.src(vendor, { + allowEmpty: true + }) .pipe(babel(config.babelOptions)) .pipe(concat('app.min.js')) .pipe(gulpIf(!config.debug, minifyJS())) @@ -181,7 +183,9 @@ const CSS = gulp.parallel(() => { vendor[i] = config.nodeDirectory + '/' + vendor[i]; } - return gulp.src(vendor) + return gulp.src(vendor, { + allowEmpty: true + }) .pipe(gulpIf('*.scss', sass(), gulpIf('*.less', less(), gulpIf('*.styl', stylus())))) .pipe(autoprefixer()) .pipe(minifyCSS({ diff --git a/include/init/configuration.php b/include/init/configuration.php index dc5084c19..0633a8f6a 100755 --- a/include/init/configuration.php +++ b/include/init/configuration.php @@ -181,26 +181,26 @@ if (post('db_host') !== null) { else { // Creazione manifest.json $manifest = '{ - "dir" : "ltr", - "lang" : "it-IT", - "name" : "OpenSTAManager", - "scope" : "'.base_path().'", - "display" : "fullscreen", - "start_url" : "'.base_path().'", - "short_name" : "OSM", - "theme_color" : "transparent", - "description" : "OpenSTAManager", - "orientation" : "any", - "background_color" : "transparent", - "generated" : "true", - "icons" : [ - { - "src": "assets/dist/img/logo_completo.png", - "type": "image/png", - "sizes": "489x91" - } - ] -}'; + "dir" : "ltr", + "lang" : "'.((empty($lang) || $lang == '|lang|') ? 'it-IT' : str_replace('_','-',$lang)).'", + "name" : "'.tr('OpenSTAManager').'", + "scope" : "'.((empty(base_path()) || base_path()=='/') ? '' : '.').'", + "display" : "fullscreen", + "start_url" : "'.((empty(base_path()) || base_path()=='/') ? '/' : './').'", + "short_name" : "OSM", + "theme_color" : "transparent", + "description" : "'.tr('OpenSTAManager').'", + "orientation" : "any", + "background_color" : "transparent", + "generated" : "true", + "icons" : [ + { + "src": "assets/dist/img/logo_completo.png", + "type": "image/png", + "sizes": "489x91" + } + ] + }'; file_put_contents('manifest.json', $manifest); redirect(base_path().'/index.php'); @@ -209,6 +209,8 @@ if (post('db_host') !== null) { } } + + // Controlla che i parametri di configurazione permettano l'accesso al database if ((file_exists('config.inc.php') || $valid_config) && !$dbo->isConnected()) { echo ' diff --git a/package.json b/package.json index f20bb90ce..7cb77ccd5 100755 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dropzone": "^5.7.2", "eonasdan-bootstrap-datetimepicker": "^4.17.49", "font-awesome": "^4.7.0", - "fullcalendar": "^3.10.4", + "fullcalendar": "^3.10.5", "geocomplete": "^1.7.0", "hotkeys-js": "^3.8.5", "html5sortable": "^0.13.2",