diff --git a/phpwf/plugins/class.mysql.php b/phpwf/plugins/class.mysql.php index 45aa4686..d2047e03 100644 --- a/phpwf/plugins/class.mysql.php +++ b/phpwf/plugins/class.mysql.php @@ -154,7 +154,8 @@ class DB{ $version_stringFormat = str_replace('.','',$version_string); 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); return ['mariadb',$mariaVersion, $version_stringFormat]; } diff --git a/www/pages/systemhealth.php b/www/pages/systemhealth.php index a685b840..0cacbbc7 100644 --- a/www/pages/systemhealth.php +++ b/www/pages/systemhealth.php @@ -486,8 +486,8 @@ class Systemhealth { $dbVersionArr = explode('.',$dbVersion); - if($dbVersionArr[0] >= 10 && !($dbVersionArr[1] < 2)) { - $status = 'ok'; + if (($dbVersionArr[0] == 10 && !($dbVersionArr[1] < 2)) || ($dbVersionArr[0] > 10)) { + $status = 'ok'; } $mysqlVersion = 'MariaDB '.$dbVersion; }