Testfach hinzugefügt
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user