diff --git a/include/init/configuration.php b/include/init/configuration.php index 06c2decc3..0bdfcbe5c 100755 --- a/include/init/configuration.php +++ b/include/init/configuration.php @@ -179,32 +179,13 @@ if (post('db_host') !== null) { } // Continua con l'esecuzione delle operazioni previste else { - // Creazione manifest.json - $manifest = '{ - "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); + // Creazione manifest.json + include_once App::filepath('include/init', 'manifest.php'); redirect(base_path().'/index.php'); exit(); + + } } } diff --git a/include/init/manifest.php b/include/init/manifest.php new file mode 100644 index 000000000..3ed630fb7 --- /dev/null +++ b/include/init/manifest.php @@ -0,0 +1,65 @@ +. + */ + +$creation = file_put_contents('manifest.json', ''); + +if (!$creation) { + + $manifest = '{ + + "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": "'.App::getPaths()['img'].'/logo_completo.png", + "type": "image/png", + "sizes": "489x91" + } + ] +}'; + + + file_put_contents('manifest.json', $manifest); + +}else{ + + echo ' +
'.tr('Sembra che non ci siano i permessi di scrittura sul file _FILE_', [ + '_FILE_' => 'manifest.json', + ]).'
+