Reverse direction of dependency loading. The libraries used last in the parameters are now loaded first, e.g. summary is now loaded before iv!
parent
a090468657
commit
42fbb6ab1f
|
@ -2633,18 +2633,6 @@ class H5PContentValidator {
|
|||
$library = $this->h5pC->loadLibrary($libspec['machineName'], $libspec['majorVersion'], $libspec['minorVersion']);
|
||||
$library['semantics'] = $this->h5pC->loadLibrarySemantics($libspec['machineName'], $libspec['majorVersion'], $libspec['minorVersion']);
|
||||
$this->libraries[$value->library] = $library;
|
||||
|
||||
// Find all dependencies for this library
|
||||
$depkey = 'preloaded-' . $libspec['machineName'];
|
||||
if (!isset($this->dependencies[$depkey])) {
|
||||
$this->dependencies[$depkey] = array(
|
||||
'library' => $library,
|
||||
'type' => 'preloaded'
|
||||
);
|
||||
|
||||
$this->nextWeight = $this->h5pC->findLibraryDependencies($this->dependencies, $library, $this->nextWeight);
|
||||
$this->dependencies[$depkey]['weight'] = $this->nextWeight++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$library = $this->libraries[$value->library];
|
||||
|
@ -2659,6 +2647,18 @@ class H5PContentValidator {
|
|||
$validkeys = array_merge($validkeys, $semantics->extraAttributes);
|
||||
}
|
||||
$this->filterParams($value, $validkeys);
|
||||
|
||||
// Find all dependencies for this library
|
||||
$depkey = 'preloaded-' . $library['machineName'];
|
||||
if (!isset($this->dependencies[$depkey])) {
|
||||
$this->dependencies[$depkey] = array(
|
||||
'library' => $library,
|
||||
'type' => 'preloaded'
|
||||
);
|
||||
|
||||
$this->nextWeight = $this->h5pC->findLibraryDependencies($this->dependencies, $library, $this->nextWeight);
|
||||
$this->dependencies[$depkey]['weight'] = $this->nextWeight++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue