Clean up deletion and make sure export is deleted when node is deleted
parent
bdb508c877
commit
7aef062810
|
@ -1156,6 +1156,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) {
|
||||
$libraries[$editorLibrary['machineName']] = $editorLibrary;
|
||||
|
|
Loading…
Reference in New Issue