From c0e9d66df07fa8af3a59ba63a7ab0e6d5958a6eb Mon Sep 17 00:00:00 2001 From: grandeljay Date: Mon, 27 Jun 2022 11:36:36 +0200 Subject: [PATCH] Group remembered wishlists by user --- src/pages/wishlists-saved.php | 54 ++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/src/pages/wishlists-saved.php b/src/pages/wishlists-saved.php index e8e507d8..82131ff3 100644 --- a/src/pages/wishlists-saved.php +++ b/src/pages/wishlists-saved.php @@ -13,34 +13,48 @@ $page->header(); $page->bodyStart(); $page->navigation(); -$wishlists = $_SESSION['user']->getSavedWishlists(); +$wishlists = $_SESSION['user']->getSavedWishlists(); +$wishlists_by_user = array(); + +foreach ($wishlists as $wishlist_saved) { + $wishlists_by_user[$wishlist_saved['user']][] = $wishlist_saved; +} ?>

title ?>

- -
- - hash; - ?> -
- -
- -
-
+ + $wishlists_saved) { ?> + +

getDisplayName() ?>

-
- getTitle(); ?> -
getDisplayName(); ?>
-
+ +
+ + hash; + ?> + +
+ +
+ +
+
+ +
+ getTitle(); ?> +
getDisplayName(); ?>
+
+
+
-
+