Clean up deletion and make sure export is deleted when node is deleted
parent
bdb508c877
commit
7aef062810
|
@ -1155,6 +1155,14 @@ Class H5PExport {
|
||||||
|
|
||||||
return str_replace(DIRECTORY_SEPARATOR, '/', $zipPath);
|
return str_replace(DIRECTORY_SEPARATOR, '/', $zipPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function deleteExport($contentId) {
|
||||||
|
$h5pDir = $this->h5pF->getH5pPath() . DIRECTORY_SEPARATOR;
|
||||||
|
$zipPath = $h5pDir . 'exports' . DIRECTORY_SEPARATOR . $contentId . '.h5p';
|
||||||
|
if (file_exists($zipPath)) {
|
||||||
|
file_delete($zipPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function addEditorLibraries($libraries, $editorLibraries) {
|
private function addEditorLibraries($libraries, $editorLibraries) {
|
||||||
foreach ($editorLibraries as $editorLibrary) {
|
foreach ($editorLibraries as $editorLibrary) {
|
||||||
|
|
Loading…
Reference in New Issue