Compare commits

...

2 Commits

Author SHA1 Message Date
niklas.ortmann 7269ea03db Update showCategory-controller.php 2026-06-03 19:58:09 +02:00
niklas.ortmann 2a3a15c92d Update showCategory.php 2026-06-03 19:58:05 +02:00
2 changed files with 3 additions and 4 deletions
+3 -3
View File
@@ -13,11 +13,11 @@ include_once "php/controller/showCategory-controller.php";
<div class="s-res-item">
<div class="s-res-content">
<h2 class="s-res-item-title">
<a href="index.php?pfad=showArticle&id=<?php echo $article['id']; ?>" class="s-res-link">
<?php echo htmlspecialchars($article['title']); ?>
<a href="index.php?pfad=showArticle&id=<?php echo $article->getId(); ?>" class="s-res-link">
<?php echo htmlspecialchars($article->getTitle()); ?>
</a>
</h2>
<p class="s-res-author">Von: <span class="s-res-author-name"><?php echo htmlspecialchars($article['author']); ?></span></p>
<p class="s-res-author">Von: <span class="s-res-author-name"><?php echo htmlspecialchars($article->getAuthor()); ?></span></p>
</div>
<div class="s-res-arrow">&rarr;</div>
</div>
@@ -8,7 +8,6 @@ if (isset($_GET["category"]) && !empty($_GET["category"]) && articleCategoryVali
try {
$articleManager = ArticleManager::getInstance();
$articles = $articleManager->getArticlesByCategory($category);
echo $articles[0]->getTitle();
} catch (Exception $e) {
$_SESSION["message"] = "internal_error";
include_once "content/404.php";