Become node_clone compatible again

namespaces
Svein-Tore Griff With 2014-11-02 19:13:14 +01:00
parent 41ed0c18e4
commit 7c3ddea71a
1 changed files with 14 additions and 10 deletions

View File

@ -1648,19 +1648,23 @@ class H5PCore {
// Update content dependencies. // Update content dependencies.
$content['dependencies'] = $validator->getDependencies(); $content['dependencies'] = $validator->getDependencies();
$this->h5pF->deleteLibraryUsage($content['id']);
$this->h5pF->saveLibraryUsage($content['id'], $content['dependencies']);
if ($this->exportEnabled) { // Sometimes the parameters are filtered before content has been created
// Recreate export file if ($content['id']) {
$exporter = new H5PExport($this->h5pF, $this); $this->h5pF->deleteLibraryUsage($content['id']);
$exporter->createExportFile($content); $this->h5pF->saveLibraryUsage($content['id'], $content['dependencies']);
// TODO: Should we rather create the file once first accessed, like imagecache? if ($this->exportEnabled) {
// Recreate export file
$exporter = new H5PExport($this->h5pF, $this);
$exporter->createExportFile($content);
// TODO: Should we rather create the file once first accessed, like imagecache?
}
// Cache.
$this->h5pF->setFilteredParameters($content['id'], $params);
} }
// Cache.
$this->h5pF->setFilteredParameters($content['id'], $params);
return $params; return $params;
} }