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:
parent
8cc3137ba2
commit
d321458d25
@ -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
|
||||
|
@ -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 '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user