HFP-1871 Clean code
parent
942fd922bc
commit
9314c55994
|
@ -1938,10 +1938,8 @@ class H5PCore {
|
||||||
}
|
}
|
||||||
$validator->validateLibrary($params, (object) array('options' => array($params->library)));
|
$validator->validateLibrary($params, (object) array('options' => array($params->library)));
|
||||||
|
|
||||||
// Add latest MathDisplay version if content contains math
|
|
||||||
$libs = $this->h5pF->loadLibraries();
|
|
||||||
|
|
||||||
// Get latest version of MathDisplay library
|
// Get latest version of MathDisplay library
|
||||||
|
$libs = $this->h5pF->loadLibraries();
|
||||||
$mathLibs = $libs['H5P.MathDisplay'];
|
$mathLibs = $libs['H5P.MathDisplay'];
|
||||||
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) {
|
||||||
|
@ -1952,6 +1950,7 @@ class H5PCore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add latest MathDisplay version if content contains math
|
||||||
if (isset($mathLib)) {
|
if (isset($mathLib)) {
|
||||||
// Retrieve regular expression from library.json
|
// Retrieve regular expression from library.json
|
||||||
// Careful: \ will have to be escaped itself inside json
|
// Careful: \ will have to be escaped itself inside json
|
||||||
|
|
Loading…
Reference in New Issue