diff --git a/app/resto/core/RestoConstants.php b/app/resto/core/RestoConstants.php index 16dd2c62..0f8957a5 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.9'; + const VERSION = '9.6.0'; /* ============================================================ * NEVER EVER TOUCH THESE VALUES diff --git a/app/resto/core/dbfunctions/FiltersFunctions.php b/app/resto/core/dbfunctions/FiltersFunctions.php index 9d3541ce..d3d62e99 100755 --- a/app/resto/core/dbfunctions/FiltersFunctions.php +++ b/app/resto/core/dbfunctions/FiltersFunctions.php @@ -86,7 +86,7 @@ public function prepareFilters($paramsWithOperation, $sortKey) if (isset($filterCS) && $filterCS !== '') { $filters[] = $filterCS; } - + /* * Skip the following */ @@ -155,7 +155,7 @@ public function prepareFilters($paramsWithOperation, $sortKey) } } } - + // searchTerms specialcase - everything processed at the end if (count($this->terms) > 0) { @@ -947,7 +947,8 @@ private function getCollectionsInCatalog($catalogPartName) $results = $this->context->dbDriver->query('SELECT id,rtype,counters,links FROM ' . $this->context->dbDriver->targetSchema . '.catalog WHERE id ILIKE \'%' . $this->context->dbDriver->escape_string($catalogPartName) . '%\''); while ($result = pg_fetch_assoc($results)) { if ($result['rtype'] === 'collection') { - $collectionId = str_replace('collections/', '', $result['id']); + // The collection name is the last string of path + $collectionId = end(explode('/', $result['id'])); if ( !in_array($collectionId, $collectionIds) ) { $collectionIds[] = $collectionId; }