Update showCategory-controller.php
This commit is contained in:
@@ -19,7 +19,11 @@ if (isset($_GET["category"]) && !empty($_GET["category"]) && articleCategoryVali
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$articleManager = ArticleManager::getInstance();
|
$articleManager = ArticleManager::getInstance();
|
||||||
|
$userManager = UserManager::getInstance();
|
||||||
$allArticles = $articleManager->getArticlesByCategory($category);
|
$allArticles = $articleManager->getArticlesByCategory($category);
|
||||||
|
foreach ($allArticles as $article) {
|
||||||
|
$article->setAuthor($userManager->findUser($article->getAuthor())["vorname"]) . " " . $userManager->findUser($article->getAuthor())["nachname"];
|
||||||
|
}
|
||||||
$totalArticles = count($allArticles);
|
$totalArticles = count($allArticles);
|
||||||
|
|
||||||
// --- SORTIERUNG LOGIK ---
|
// --- SORTIERUNG LOGIK ---
|
||||||
|
|||||||
Reference in New Issue
Block a user