Skip to content

Commit

Permalink
Merge pull request #70 from h5p/revert-68-libraryPathSubclass
Browse files Browse the repository at this point in the history
Revert "Allow the dependency path to be overridden by child classes"
  • Loading branch information
fnoks authored Nov 12, 2019
2 parents 4256810 + 87f6f3c commit 4c973c3
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 4c973c3

Please sign in to comment.