Skip to content

Commit

Permalink
Revert "Allow the dependency path to be overridden by child classes"
Browse files Browse the repository at this point in the history
  • Loading branch information
fnoks authored Nov 12, 2019
1 parent 4256810 commit 87f6f3c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions h5p.classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2432,7 +2432,7 @@ public function getDependenciesFiles($dependencies, $prefix = '') {
// 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']);
}
Expand All @@ -2452,16 +2452,6 @@ public function getDependenciesFiles($dependencies, $prefix = '') {
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();
Expand Down

0 comments on commit 87f6f3c

Please sign in to comment.