bugfix systemhealth database version > 10.2

This commit is contained in:
OpenXE 2024-11-13 12:27:12 +01:00
parent 9fc8e3cb2a
commit 60ff6243f4
2 changed files with 4 additions and 3 deletions

View File

@ -154,7 +154,8 @@ class DB{
$version_stringFormat = str_replace('.','',$version_string); $version_stringFormat = str_replace('.','',$version_string);
return ['mysql', $version_string, $version_stringFormat]; return ['mysql', $version_string, $version_stringFormat];
} }
$mariaVersion = substr($version, 0, 4); $version_array = explode('.', $version);
$mariaVersion = $version_array[0].'.'.$version_array[1];
$version_stringFormat = str_replace('.','', $mariaVersion); $version_stringFormat = str_replace('.','', $mariaVersion);
return ['mariadb',$mariaVersion, $version_stringFormat]; return ['mariadb',$mariaVersion, $version_stringFormat];
} }

View File

@ -486,7 +486,7 @@ class Systemhealth {
$dbVersionArr = explode('.',$dbVersion); $dbVersionArr = explode('.',$dbVersion);
if($dbVersionArr[0] >= 10 && !($dbVersionArr[1] < 2)) { if (($dbVersionArr[0] == 10 && !($dbVersionArr[1] < 2)) || ($dbVersionArr[0] > 10)) {
$status = 'ok'; $status = 'ok';
} }
$mysqlVersion = 'MariaDB '.$dbVersion; $mysqlVersion = 'MariaDB '.$dbVersion;