Clean up deletion and make sure export is deleted when node is deleted

namespaces
Svein-Tore Griff With 2013-11-18 17:57:32 +01:00
parent bdb508c877
commit 7aef062810
1 changed files with 8 additions and 0 deletions

View File

@ -1155,6 +1155,14 @@ Class H5PExport {
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) {
foreach ($editorLibraries as $editorLibrary) {