Skip to content

Commit 993879f

Browse files
authored
Merge pull request #487 from jjrom/develop
Correct issue when searching with owner
2 parents 304afed + e55d5e3 commit 993879f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/resto/core/RestoCollections.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,12 @@ public function load($params = array())
204204
{
205205

206206
if ( !$this->isLoaded ) {
207-
207+
208+
if ( isset($params['owner']) ) {
209+
$owner = new RestoUser(array('username' => $params['owner']), $this->context);
210+
$params['owner'] = $owner->profile['id'];
211+
}
208212
$collectionsDesc = (new CollectionsFunctions($this->context->dbDriver))->getCollections($this->user, $params);
209-
210213
foreach (array_keys($collectionsDesc) as $collectionId) {
211214
$collection = $this->context->keeper->getRestoCollection($collectionId, $this->user);
212215
foreach ($collectionsDesc[$collectionId] as $key => $value) {

app/resto/core/RestoConstants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class RestoConstants
2020
// [IMPORTANT] Starting resto 7.x, default routes are defined in RestoRouter class
2121

2222
// resto version
23-
const VERSION = '9.5.6';
23+
const VERSION = '9.5.7';
2424

2525
/* ============================================================
2626
* NEVER EVER TOUCH THESE VALUES

0 commit comments

Comments
 (0)