From 7a146d89825b3044b22189dc133c294f210d965d Mon Sep 17 00:00:00 2001 From: Matthias Grief Date: Thu, 5 Dec 2024 17:49:41 +0100 Subject: [PATCH] Fach- und Themendaten umstrukturiert --- webseite/classes/Config.php | 51 ++++++++++++++++++++++++++++++++ webseite/classes/SubjectData.php | 13 ++++---- webseite/classes/TopicData.php | 13 ++++---- 3 files changed, 63 insertions(+), 14 deletions(-) create mode 100644 webseite/classes/Config.php diff --git a/webseite/classes/Config.php b/webseite/classes/Config.php new file mode 100644 index 0000000..27e6f42 --- /dev/null +++ b/webseite/classes/Config.php @@ -0,0 +1,51 @@ +files = array(); } - $article = Util::readFileContent("$topicDataDirectory/article.html"); + $article = Util::readFileContent(Config::getTopicDirectory($subjectId, $topicId) . "article.html"); if (!isset($article)) { $article = "Kein Erklärtext vorhanden"; } - $article = str_replace('$TOPICPATH', $topicDataDirectory, $article); + $article = str_replace('$TOPICPATH', Config::getTopicDirectory($subjectId, $topicId), $article); $result->article = $article; return $result; } - } \ No newline at end of file