diff --git a/CHANGELOG-v3.md b/CHANGELOG-v3.md index 37c0696398b..b65d0f4a9f7 100644 --- a/CHANGELOG-v3.md +++ b/CHANGELOG-v3.md @@ -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 diff --git a/src/elements/Asset.php b/src/elements/Asset.php index 4a9cb14f9be..9398afda4ad 100644 --- a/src/elements/Asset.php +++ b/src/elements/Asset.php @@ -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