Skip to content

Commit

Permalink
Merge pull request #364 from matdave/for-3
Browse files Browse the repository at this point in the history
Updating to PL
  • Loading branch information
matdave authored May 5, 2023
2 parents 82f70b4 + 7d00cde commit 94dfa9a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog for Collections.
Collections 4.0.0
===================
- Support for MODX Revolution 3.0.0
- Fix Fred endpoints
- Fix quick update action
- Fix view for Create New
- Fetch distinct resources for collection

Collections 3.7.1
===================
Expand Down
2 changes: 1 addition & 1 deletion _build/gpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"namespace": "Collections",
"description": "Hides resources under this container in tree. Adding grid int o the update resource panel.",
"author": "John Peca",
"version": "4.0.0-beta1",
"version": "4.0.0-pl",
"menus": [
{
"text": "collections.menu.collection_templates",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public function prepareQueryBeforeCount(xPDOQuery $c)
public function prepareQueryAfterCount(xPDOQuery $c)
{

$c->select($this->modx->getSelectColumns(modResource::class, 'modResource'));
$c->select('DISTINCT ' . $this->modx->getSelectColumns(modResource::class, 'modResource'));
$c->select([
'has_children' => "EXISTS (SELECT 1 FROM {$this->modx->getTableName(modResource::class)} r WHERE r.parent = modResource.id)"
]);
Expand Down

0 comments on commit 94dfa9a

Please sign in to comment.