From ffc81244e6e6a5b6dba1a1e2ad48065acc20ea2c Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Fri, 15 Mar 2024 13:17:23 +0100 Subject: [PATCH] Fix minori --- core.php | 8 ++++--- include/init/requirements.php | 39 +++++++++++++++++++++-------------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/core.php b/core.php index 17164ba84..2ec5169a9 100755 --- a/core.php +++ b/core.php @@ -266,8 +266,6 @@ if (!API\Response::isAPIRequest()) { Permissions::check(); - // Impostazione della lingua - App::setLang(setting('Lingua')); } // Retrocompatibilità @@ -305,4 +303,8 @@ foreach ($custom_files as $key => $value) { $list = array_merge($files, $custom_files); foreach ($list as $file) { include_once $file; -} \ No newline at end of file +} + +if (database()->tableExists('zz_settings')) { + App::setLang(setting('Lingua')); +} diff --git a/include/init/requirements.php b/include/init/requirements.php index a370b9aef..c45fe4ceb 100755 --- a/include/init/requirements.php +++ b/include/init/requirements.php @@ -245,20 +245,29 @@ foreach ($settings as $name => $values) { // MySQL if ($database->isInstalled()) { - $db = [ - 'mysql_version' => [ - 'type' => 'version', - 'warning' => (($database->isMySQL())? false : true), - 'description' => (($database->isMySQL())? '5.7.x - 8.0.x' : '10.x'), - 'minimum' => (($database->isMySQL())? '5.7.0' : '10.1.0'), - 'maximum' => (($database->isMySQL())? '8.0.99' : '10.6.99'), - ], - - 'sort_buffer_size' => [ - 'type' => 'value', - 'description' => '>2M', - ], - ]; + if (method_exists($database, 'isMySQL')) { + $db = [ + 'mysql_version' => [ + 'type' => 'version', + 'warning' => $database->isMySQL() ? false : true, + 'description' => $database->isMySQL() ? '5.7.x - 8.0.x' : '10.x', + 'minimum' => $database->isMySQL() ? '5.7.0' : '10.1.0', + 'maximum' => $database->isMySQL() ? '8.0.99' : '10.6.99', + ], + + 'sort_buffer_size' => [ + 'type' => 'value', + 'description' => '>2M', + ], + ]; + } else { + $db = [ + 'sort_buffer_size' => [ + 'type' => 'value', + 'description' => '>2M', + ], + ]; + } /*foreach (App::getConfig()['db_options'] as $n => $v){ @@ -447,7 +456,7 @@ $requirements = [ '_SUPPORTED_' => ((version_compare(phpversion(), $settings['php_version']['minimum'], '>=') && version_compare(phpversion(), $settings['php_version']['maximum'], '<=')) ? '' : ' '.tr('versioni supportate:').' '.$settings['php_version']['description'].''), ]) => $php, tr('DBMS (_TYPE_)', [ - '_TYPE_' => $database->getType(), + '_TYPE_' => method_exists($database, 'getType') ? $database->getType() : '', ] ) => $mysql, tr('Percorsi di servizio') => $directories, tr('File di servizio') => $files,