Merge pull request #70 from h5p/revert-68-libraryPathSubclass
Revert "Allow the dependency path to be overridden by child classes"pull/72/head moodle-1.20.1
commit
4c973c3088
|
@ -2432,7 +2432,7 @@ class H5PCore {
|
||||||
// Using content dependencies
|
// Using content dependencies
|
||||||
foreach ($dependencies as $dependency) {
|
foreach ($dependencies as $dependency) {
|
||||||
if (isset($dependency['path']) === FALSE) {
|
if (isset($dependency['path']) === FALSE) {
|
||||||
$dependency['path'] = $this->getDependencyPath($dependency);
|
$dependency['path'] = 'libraries/' . H5PCore::libraryToString($dependency, TRUE);
|
||||||
$dependency['preloadedJs'] = explode(',', $dependency['preloadedJs']);
|
$dependency['preloadedJs'] = explode(',', $dependency['preloadedJs']);
|
||||||
$dependency['preloadedCss'] = explode(',', $dependency['preloadedCss']);
|
$dependency['preloadedCss'] = explode(',', $dependency['preloadedCss']);
|
||||||
}
|
}
|
||||||
|
@ -2452,16 +2452,6 @@ class H5PCore {
|
||||||
return $files;
|
return $files;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the path to the dependency.
|
|
||||||
*
|
|
||||||
* @param array $dependency
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function getDependencyPath(array $dependency): string {
|
|
||||||
return 'libraries/' . H5PCore::libraryToString($dependency, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function getDependenciesHash(&$dependencies) {
|
private static function getDependenciesHash(&$dependencies) {
|
||||||
// Build hash of dependencies
|
// Build hash of dependencies
|
||||||
$toHash = array();
|
$toHash = array();
|
||||||
|
|
Loading…
Reference in New Issue