From 2831a132e62902b46797986879027a97ff0d4dc9 Mon Sep 17 00:00:00 2001 From: Jay Trees Date: Tue, 19 Apr 2022 09:04:31 +0200 Subject: [PATCH] Fix fulfilled wishes visible for owner --- src/classes/wishlist.php | 2 ++ src/pages/wishlist.php | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/classes/wishlist.php b/src/classes/wishlist.php index 74a8a1c4..145fa59f 100644 --- a/src/classes/wishlist.php +++ b/src/classes/wishlist.php @@ -61,6 +61,8 @@ class Wishlist $WHERE = isset($sql['WHERE']) ? $sql['WHERE'] : '`wishlist` = ' . $this->id; $ORDER_BY = isset($sql['ORDER_BY']) ? $sql['ORDER_BY'] : '`priority` DESC, `title` ASC, `url` ASC'; + $WHERE .= ' AND (`status` != "' . Wish::STATUS_FULFILLED . '" OR `status` IS NULL)'; + $this->wishes = $database ->query('SELECT ' . $SELECT . ' FROM ' . $FROM . ' diff --git a/src/pages/wishlist.php b/src/pages/wishlist.php index 900d54e7..6bf62f7c 100644 --- a/src/pages/wishlist.php +++ b/src/pages/wishlist.php @@ -80,8 +80,7 @@ $page->navigation(); OR `status` IS NULL OR `status` < unix_timestamp(CURRENT_TIMESTAMP - INTERVAL ' . Wish::STATUS_TEMPORARY_MINUTES . ' MINUTE) ) - AND (`status` != "' . Wish::STATUS_UNAVAILABLE . '" OR `status` IS NULL) - AND (`status` != "' . Wish::STATUS_FULFILLED . '" OR `status` IS NULL)' + AND (`status` != "' . Wish::STATUS_UNAVAILABLE . '" OR `status` IS NULL)' ) ); ?>