Resolve "Fehlerhaftes Löschen von Übungsblättern" #82

Merged
mg8220s merged 1 commits from 55-fehlerhaftes-loschen-von-ubungsblattern into dev 2024-12-11 09:19:43 +01:00

View File

@@ -347,8 +347,8 @@ class TopicData
$this->files = array_diff($this->files, $nonexistentEntries); $this->files = array_diff($this->files, $nonexistentEntries);
foreach (Util::getFilesFromDirectory(Config::getTopicDirectory($this->subjectId, $this->id) . "downloads/") as $file) { foreach (Util::getFilesFromDirectory(Config::getTopicDirectory($this->subjectId, $this->id) . "downloads/") as $file) {
if(!array_search($file, $this->files) === false) { if(!array_search($file, $this->files)) {
Util::delete(Config::getTopicDirectory($this->subjectId, $this->id) . "downloads/$file"); $this->deleteDownload($file);
$changed = true; $changed = true;
} }
} }