Show archived categories properly

This commit is contained in:
wrongecho
2025-05-20 14:51:12 +01:00
parent ccb2af6d17
commit b858d82b0b

View File

@@ -27,10 +27,6 @@ $sql = mysqli_query(
); );
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
if (isset($_GET['archived'])) {
$category = "Archived";
}
?> ?>
<div class="card card-dark"> <div class="card card-dark">
@@ -98,7 +94,7 @@ if (isset($_GET['archived'])) {
} else { } else {
echo 'btn-default'; echo 'btn-default';
} ?>">Ticket</a> } ?>">Ticket</a>
<a href="?archived=1" <a href="?<?php echo $url_query_strings_sort ?>&archived=1"
class="btn <?php if (isset($_GET['archived'])) { class="btn <?php if (isset($_GET['archived'])) {
echo 'btn-primary'; echo 'btn-primary';
} else { } else {
@@ -150,7 +146,7 @@ if (isset($_GET['archived'])) {
</button> </button>
<div class="dropdown-menu"> <div class="dropdown-menu">
<?php <?php
if ($category == "Archived") { if ($archived) {
?> ?>
<a class="dropdown-item text-success confirm-link" <a class="dropdown-item text-success confirm-link"
href="post.php?unarchive_category=<?php echo $category_id; ?>"> href="post.php?unarchive_category=<?php echo $category_id; ?>">