Commit 298fd8f7 authored by thomasmars's avatar thomasmars

Merge branches '7.x-1.x' and '7.x-1.x-HFP-822-ajax-refactor' of...

Merge branches '7.x-1.x' and '7.x-1.x-HFP-822-ajax-refactor' of git.drupal.org:project/h5p into 7.x-1.x-HFP-822-ajax-refactor
parents 1016863c 64d9201b
......@@ -285,7 +285,7 @@ class H5PDefaultStorage implements \H5PFileStorage {
* @return string
*/
public function getContent($file_path) {
return file_get_contents($file_path);
return file_get_contents($this->path . $file_path);
}
/**
......
......@@ -321,9 +321,8 @@ class H5peditor {
* @param int $majorVersion
* @param int $minorVersion
* @param string $prefix Optional part to add between URL and asset path
* @param string $fileDir Optional file dir to read files from
*/
public function getLibraryData($machineName, $majorVersion, $minorVersion, $languageCode, $prefix = '', $fileDir = '') {
public function getLibraryData($machineName, $majorVersion, $minorVersion, $languageCode, $prefix = '') {
$libraryData = new stdClass();
$libraries = $this->findEditorLibraries($machineName, $majorVersion, $minorVersion);
......@@ -337,14 +336,14 @@ class H5peditor {
// the editor works.
// Get list of JS and CSS files that belongs to the dependencies
$files = $this->h5p->getDependenciesFiles($libraries, $prefix);
$files = $this->h5p->getDependenciesFiles($libraries);
$this->storage->alterLibraryFiles($files, $libraries);
// Restore asset aggregation setting
$this->h5p->aggregateAssets = $aggregateAssets;
// Create base URL
$url = $this->h5p->url;
$url = $this->h5p->url . $prefix;
// Javascripts
if (!empty($files['scripts'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment