dev auf main #68
@@ -234,13 +234,18 @@ class DatabaseInitializer {
|
||||
// Bestimmt per Zufall einen Autor aus dem Pool der gültigen E-Mails
|
||||
$randomAuthor = $availableEmails[array_rand($availableEmails)];
|
||||
|
||||
// Text in (blocks[i][type]/[text]/[image])-Format umwandeln:
|
||||
$content = json_encode([
|
||||
['type' => 'text', 'value' => $article[1]]
|
||||
], JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$articleInsertStmt->execute([
|
||||
':title' => $article[0],
|
||||
':content' => $article[1],
|
||||
':content' => $content,
|
||||
':author' => $randomAuthor,
|
||||
':category' => $article[2],
|
||||
':tags' => $article[3]
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user