From e55d5e3ac57dc009cf888d411a16b982779db43a Mon Sep 17 00:00:00 2001 From: jjrom Date: Mon, 13 Jan 2025 09:19:19 +0100 Subject: [PATCH] Correct issue when searching with owner --- app/resto/core/RestoCollections.php | 7 +++++-- app/resto/core/RestoConstants.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/resto/core/RestoCollections.php b/app/resto/core/RestoCollections.php index cb2bb512..499ebaec 100755 --- a/app/resto/core/RestoCollections.php +++ b/app/resto/core/RestoCollections.php @@ -204,9 +204,12 @@ public function load($params = array()) { if ( !$this->isLoaded ) { - + + if ( isset($params['owner']) ) { + $owner = new RestoUser(array('username' => $params['owner']), $this->context); + $params['owner'] = $owner->profile['id']; + } $collectionsDesc = (new CollectionsFunctions($this->context->dbDriver))->getCollections($this->user, $params); - foreach (array_keys($collectionsDesc) as $collectionId) { $collection = $this->context->keeper->getRestoCollection($collectionId, $this->user); foreach ($collectionsDesc[$collectionId] as $key => $value) { diff --git a/app/resto/core/RestoConstants.php b/app/resto/core/RestoConstants.php index 2a4244b5..87d76e5b 100644 --- a/app/resto/core/RestoConstants.php +++ b/app/resto/core/RestoConstants.php @@ -20,7 +20,7 @@ class RestoConstants // [IMPORTANT] Starting resto 7.x, default routes are defined in RestoRouter class // resto version - const VERSION = '9.5.6'; + const VERSION = '9.5.7'; /* ============================================================ * NEVER EVER TOUCH THESE VALUES