updateArticle funktioniert

This commit is contained in:
2026-06-01 09:41:34 +02:00
parent e86fef1766
commit 71a8dd5f17
5 changed files with 21 additions and 13 deletions
+4 -4
View File
@@ -45,10 +45,9 @@ include_once 'php/controller/profileArticles-controller.php';
<div class="articles-list">
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "internal_error"): ?>
<p class="alert-message is-error">
Es ist ein Fehler beim Speichern aufgetreten. Bitte versuche es erneut.
Es ist ein interner Fehler aufgetreten. Bitte versuche es erneut.
</p>
<?php elseif (isset($userArticles) && count($userArticles) > 0): ?>
<?php foreach ($userArticles as $userArticle): ?>
<!-- Ein einzelner Artikel-Eintrag -->
<div class="article-item">
@@ -57,7 +56,6 @@ include_once 'php/controller/profileArticles-controller.php';
<span class="article-category"><?php echo htmlspecialchars($userArticle->getCategory()); ?></span>
</div>
<h3 class="article-title"><?php echo htmlspecialchars($userArticle->getTitle()); ?></h3>
<?php
$tags = $userArticle->getTags();
if (isset($tags) && !empty($tags)): ?>
@@ -81,13 +79,15 @@ include_once 'php/controller/profileArticles-controller.php';
<a href="index.php?pfad=updateArticle&id=<?php echo $userArticle->getID(); ?>" class="edit-link-button">Bearbeiten</a>
</div>
<?php endforeach; ?>
<?php else: ?>
<p>Du hast noch keine Beiträge erstellt.</p>
<button type="button" class="login-button" onclick="window.location.href='index.php?pfad=createArticle';">
Beitrag erstellen!
</button>
<?php endif; ?>
<?php
unset($_SESSION["message"]);
?>
</div>
</div>