Bearbeitung von Übungsblättern eingefügt

This commit is contained in:
Matthias Grief
2025-01-02 18:28:04 +01:00
parent 889a31e8be
commit 254630ab67
2 changed files with 52 additions and 10 deletions

View File

@@ -226,7 +226,7 @@ class TopicData
}
$result->cleanupRelatedTopics();
$result->cleanupFiles();
//$result->cleanupFiles();
return $result;
}
@@ -238,7 +238,7 @@ class TopicData
public function save(): bool
{
$this->cleanupRelatedTopics();
$this->cleanupFiles();
//$this->cleanupFiles();
$data = array();
$data["displayName"] = $this->displayName;
@@ -316,11 +316,13 @@ class TopicData
*/
public function deleteDownload(string $name): bool
{
if (!isset($this->files[$name])) {
if (!in_array($name, $this->files)) {
echo "a";
return false;
}
if (!unlink(Config::getTopicDirectory($this->getSubjectId(), $this->getId()) . "downloads/$name")) {
echo "b";
return false;
}