More bug fixes!

This commit is contained in:
Michał Gdula 2022-10-05 18:54:26 +00:00
parent 59b30d9d73
commit be7d4b5b43
5 changed files with 30 additions and 22 deletions

View file

@ -94,10 +94,10 @@
<div class="defaultDecoration defaultSpacing defaultFonts">
<h2>Description</h2>
<?php
if (empty($image['description'])) {
if (empty($image['alt'])) {
echo "<p>No description provided.</p>";
} else {
echo "<p>".$image['description']."</p>";
echo "<p>".$image['alt']."</p>";
}
?>
</div>
@ -109,13 +109,13 @@
<?php
// User
if (empty($image['author'])) {
if (isset($author['username'])) {
echo "<p>Author: ".$author['username']."</p>";
} else {
echo "<p>Author: Deleted user</p>";
}
echo "<p>Author: No author</p>";
} else {
echo "<p>Author: <a href='profile.php?user=".$image['author']."' class='link'>".$author['username']."</a></p>";
if (isset($author['username'])) {
echo "<p>Author: <a href='profile.php?user=".$image['author']."' class='link'>".$author['username']."</a></p>";
} else {
echo "<p>Author: <a href='profile.php?user=".$image['author']."' class='link'>Deleted user</a></p>";
}
}
// Image ID