1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-26 00:07:47 +01:00

Fix installazione

This commit is contained in:
Pek5892 2024-03-15 10:47:24 +01:00
parent 8cc3137ba2
commit d321458d25
2 changed files with 13 additions and 6 deletions

View File

@ -274,6 +274,8 @@ if ($database->isInstalled()) {
}*/
}
$mysql = [];
foreach ($db as $name => $values) {
$description = $values['description'];
@ -453,7 +455,9 @@ $requirements = [
];
if (!$database->isInstalled() || empty($mysql)) {
unset($requirements['MySQL']);
unset($requirements[tr('DBMS (_TYPE_)', [
'_TYPE_' => $database->getType(),
] )]);
}
// Tabelle di riepilogo

View File

@ -212,13 +212,16 @@ class Database extends Util\Singleton
*/
public function getType()
{
$ver = $this->fetchArray('SELECT VERSION()');
if (preg_match('/MariaDB/', $ver[0]['VERSION()'])) {
return 'MariaDB';
if ($this->isInstalled()) {
$ver = $this->fetchArray('SELECT VERSION()');
if (preg_match('/MariaDB/', $ver[0]['VERSION()'])) {
return 'MariaDB';
} else {
return 'MySQL';
}
} else {
return 'MySQL';
return '';
}
}