HFP-1871 Fix missing variables

HFP-2095-Fix-table-styling
Oliver Tacke 2018-08-01 10:55:13 +02:00 committed by GitHub
parent d068b82ff5
commit 64e5ab4424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -1941,12 +1941,18 @@ class H5PCore {
// Get latest version of MathDisplay library // Get latest version of MathDisplay library
$libs = $this->h5pF->loadLibraries(); $libs = $this->h5pF->loadLibraries();
$mathLibs = $libs['H5P.MathDisplay']; $mathLibs = $libs['H5P.MathDisplay'];
$majorMax = '0';
$minorMax = '0';
foreach($mathLibs as $libVersion) { foreach($mathLibs as $libVersion) {
if ($libVersion->major_version === $majorMax && $libVersion->minor_version > $minorMax) { if ($libVersion->major_version === $majorMax && $libVersion->minor_version >= $minorMax) {
$mathLib = $libVersion; $mathLib = $libVersion;
$minorMax = $libVersion->minor_version;
} }
else if ($libVersion->major_version > $majorMax) { else if ($libVersion->major_version > $majorMax) {
$mathLib = $libVersion; $mathLib = $libVersion;
$majorMax = $libVersion->major_version;
$minorMax = $libVersion->minor_version;
} }
} }