Teil 2 #94

Merged
mg8220s merged 121 commits from dev into main 2025-01-08 10:16:03 +01:00
5 changed files with 20 additions and 2 deletions
Showing only changes of commit 57e67ae29c - Show all commits

View File

@@ -0,0 +1,6 @@
{
"displayName": "test",
"description": "tests",
"color": "#000000",
"icon": "fa-vial"
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
{
"displayName": "bildtest",
"icon": "fa-vial",
"description": "tests mit bildern",
"relatedTopics": []
}

View File

@@ -0,0 +1 @@
[]

View File

@@ -80,6 +80,10 @@ if($_SERVER['REQUEST_METHOD'] == 'POST') {
$relatedTopics[] = $relatedTopic;
}
$dom = new DOMDocument();
$dom->loadHTML($_POST['article']);
$article = $dom->textContent;
if(isset($allSubjects[$_POST['subjectId']]->getTopics()[$_POST['id']])) {
$newTopic = $allSubjects[$_POST['subjectId']]->getTopics()[$_POST['id']];
@@ -89,9 +93,9 @@ if($_SERVER['REQUEST_METHOD'] == 'POST') {
$newTopic->setIcon($_POST['icon']);
$newTopic->setRelatedTopics($relatedTopics);
$newTopic->setArticle($_POST['article']);
$newTopic->setArticle($article);
} else {
$newTopic = TopicData::createNew($_POST['id'], $_POST['subjectId'], $_POST['displayName'], $_POST['icon'], $_POST['description'], $relatedTopics, $_POST['article']);
$newTopic = TopicData::createNew($_POST['id'], $_POST['subjectId'], $_POST['displayName'], $_POST['icon'], $_POST['description'], $relatedTopics, $article);
}
if(!$newTopic) {