Skip to content

Commit

Permalink
Merge branch '1.0' into 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dnsl48 committed Jan 27, 2019
2 parents b858a85 + 66bcfcd commit a10cf78
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ matrix:
env: NPM_TEST=1
- php: 5.6
env: PHPCS_TEST=1
- php: 5.6
env:
- DB=PGSQL
- PHPUNIT_TEST=1

before_script:
# Extra $PATH
Expand All @@ -50,6 +54,7 @@ before_script:

# Install composer
- composer validate
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev --prefer-dist; fi
- composer require silverstripe/recipe-testing:^1 silverstripe/recipe-cms 1.1.x-dev --no-update --prefer-dist
- composer update

Expand Down
6 changes: 5 additions & 1 deletion code/GraphQL/FolderTypeCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use SilverStripe\GraphQL\Pagination\Connection;
use SilverStripe\ORM\DataQuery;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DB;

/**
* @skipUpgrade
Expand Down Expand Up @@ -161,7 +162,10 @@ public function resolveChildrenConnection(
$list = $list->alterDataQuery(function (DataQuery $query, DataList $list) {
$existingOrderBys = $query->query()->getOrderBy();
$query->sort(
'(CASE WHEN "ClassName"=\'SilverStripe\\\\Assets\\\\Folder\' THEN 1 ELSE 0 END)',
sprintf(
'(CASE WHEN "ClassName"=%s THEN 1 ELSE 0 END)',
DB::get_conn()->quoteString('SilverStripe\Assets\Folder')
),
'DESC',
true
);
Expand Down

0 comments on commit a10cf78

Please sign in to comment.