Revert "Allow the dependency path to be overridden by child classes"

revert-68-libraryPathSubclass
Pål Jørgensen 2019-11-12 16:04:50 +01:00 committed by GitHub
parent 42568106fc
commit 87f6f3c970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 11 deletions

View File

@ -2432,7 +2432,7 @@ class H5PCore {
// Using content dependencies
foreach ($dependencies as $dependency) {
if (isset($dependency['path']) === FALSE) {
$dependency['path'] = $this->getDependencyPath($dependency);
$dependency['path'] = 'libraries/' . H5PCore::libraryToString($dependency, TRUE);
$dependency['preloadedJs'] = explode(',', $dependency['preloadedJs']);
$dependency['preloadedCss'] = explode(',', $dependency['preloadedCss']);
}
@ -2452,16 +2452,6 @@ class H5PCore {
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) {
// Build hash of dependencies
$toHash = array();