Skip to content

Commit

Permalink
Sort assets by Date Uploaded - descending by default
Browse files Browse the repository at this point in the history
Resolves #1153
  • Loading branch information
brandonkelly committed May 22, 2019
1 parent d6847d8 commit b000092
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes for Craft CMS 3.x

## Unreleased

### Changed
- Asset indexes now sort assets by Date Uploaded in descending order by default. ([#1153](https://github.com/craftcms/cms/issues/1153))

## 3.1.28 - 2019-05-21

### Added
Expand Down
1 change: 1 addition & 0 deletions src/elements/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ private static function _assembleSourceInfoForFolder(VolumeFolder $folder, bool
'label' => $folder->parentId ? $folder->name : Craft::t('site', $folder->name),
'hasThumbs' => true,
'criteria' => ['folderId' => $folder->id],
'defaultSort' => ['dateCreated', 'desc'],
'data' => [
'upload' => $folder->volumeId === null ? true : Craft::$app->getUser()->checkPermission('saveAssetInVolume:' . $volume->uid),
'folder-id' => $folder->id
Expand Down

0 comments on commit b000092

Please sign in to comment.