diff --git a/composer.json b/composer.json index 49243fc..1f4500f 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "esoko/soko-web": "0.6", + "esoko/soko-web": "0.7", "firebase/php-jwt": "^6.4" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 24789aa..27d420f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,15 +4,15 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7b9e3854a5b7ef69d360c1dfbac75c17", + "content-hash": "71f3adc97b2d83ac1d57112ecce65fac", "packages": [ { "name": "esoko/soko-web", - "version": "0.6", + "version": "v0.7", "source": { "type": "git", "url": "https://git.esoko.eu/esoko/soko-web.git", - "reference": "5e0579463cf0f4203c46e0d4f9c09cd283dbf0b8" + "reference": "88a2a99527b51dfb240ec78ac7070dc36a1022b6" }, "require": { "phpmailer/phpmailer": "^6.8", @@ -33,7 +33,7 @@ "GNU GPL 3.0" ], "description": "Lightweight web framework", - "time": "2023-04-19T21:35:03+00:00" + "time": "2023-04-30T18:20:27+00:00" }, { "name": "firebase/php-jwt", diff --git a/src/Controller/CommunityController.php b/src/Controller/CommunityController.php index f14225e..1a853e9 100644 --- a/src/Controller/CommunityController.php +++ b/src/Controller/CommunityController.php @@ -48,7 +48,7 @@ class CommunityController implements IAuthenticationRequired return null; } - \Container::$persistentDataManager->loadRelationsFromDb($community, false); + \Container::$persistentDataManager->loadRelationsFromDb($community, false, ['main_currency']); return new HtmlContent('communities/community', [ 'community' => $community, @@ -326,7 +326,7 @@ class CommunityController implements IAuthenticationRequired private function getMembers(Community $community): array { - $members = iterator_to_array($this->communityMemberRepository->getAllByCommunity($community, true, [User::class])); + $members = iterator_to_array($this->communityMemberRepository->getAllByCommunity($community, true, ['user'])); usort($members, function($a, $b) { return strnatcmp($a->getUser()->getDisplayName(), $b->getUser()->getDisplayName()); }); diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php index 2094852..d3a4960 100644 --- a/src/Controller/HomeController.php +++ b/src/Controller/HomeController.php @@ -28,7 +28,7 @@ class HomeController implements IAuthenticationRequired */ $user = \Container::$request->user(); - $ownCommunityMembers = $this->communityMemberRepository->getAllByUser($user, true, [Community::class]); + $ownCommunityMembers = $this->communityMemberRepository->getAllByUser($user, true, ['community']); $communities = []; foreach ($ownCommunityMembers as $ownCommunityMember) { $communities[] = $ownCommunityMember->getCommunity();