Skip to content

Commit

Permalink
Merge branch 'release/3.5.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Jan 19, 2021
2 parents c4b999b + e79dd43 commit b307136
Show file tree
Hide file tree
Showing 140 changed files with 1,017 additions and 587 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,32 @@
# Release Notes for Craft CMS 3.x

## 3.5.18 - 2021-01-19

### Changed
- Improved the accessibility of lightswitches in the control panel. ([#7313](https://github.com/craftcms/cms/issues/7313))
- Improved the accessibility of the Login page. ([#7268](https://github.com/craftcms/cms/issues/7268), [#7287](https://github.com/craftcms/cms/issues/7287), [#7288](https://github.com/craftcms/cms/issues/7288))
- Improved the accessibility of Number fields. ([#7367](https://github.com/craftcms/cms/issues/7367))
- Added `aria-label` or `aria-hidden` attributes to control panel icons, where appropriate. ([#7302](https://github.com/craftcms/cms/pull/7302))
- Dynamic subfolder paths in Assets fields can now output `:ignore:` to avoid an invalid subpath error if no segment is intended. ([#7353](https://github.com/craftcms/cms/issues/7353))
- Improved the error message that is output when running the `clear-caches/cp-resources` command, if the `@webroot` alias isn’t explicitly set. ([#7286](https://github.com/craftcms/cms/issues/7286))
- `craft\i18n\I18N::getFormatter()` now instantiates the formatter via `Craft::createObject()`. ([#7341](https://github.com/craftcms/cms/issues/7341))

### Fixed
- Fixed a bug where auto-created Matrix blocks were taking over the focus when creating a new entry. ([#7363](https://github.com/craftcms/cms/issues/7363))
- Fixed an error that could occur due to a race condition when generating `CustomFieldBehavior` classes. ([#7379](https://github.com/craftcms/cms/issues/7379))
- Fixed a bug where field layout tabs’ settings buttons could become inaccessible if the tab name began with a long word without any hyphens. ([#7298](https://github.com/craftcms/cms/issues/7298))
- Fixed a bug where Dropdown, Multi-select, and Number fields’ inputs weren’t getting `id` attributes that matched their labels’ `for` attributes. ([#7319](https://github.com/craftcms/cms/issues/7319))
- Fixed a bug where week day and month names were being translated based on the current formatting locale, rather than the current language. ([#7312](https://github.com/craftcms/cms/issues/7312))
- Fixed a bug where Matrix blocks weren’t getting validated when autosaving entry drafts.
- Fixed an error that could occur when saving elements with Matrix fields, if there were any custom fields whose handles conflicted with `craft\elements\db\ElementQuery` getter methods, such as `criteria`. ([#7335](https://github.com/craftcms/cms/issues/7335))
- Fixed a bug where it wasn’t possible to upload some file types via GraphQL mutations. ([#7327](https://github.com/craftcms/cms/issues/7327))
- Fixed an error that could occur on console requests if Craft didn’t think it was installed yet. ([#7309](https://github.com/craftcms/cms/issues/7309))
- Fixed a bug where clearing control panel resources would delete the `.gitignore` file as well. ([#7361](https://github.com/craftcms/cms/issues/7361))
- Fixed a bug where user registration forms could get a “Username cannot be blank” error even if the `useEmailAsUsername` config setting was enabled. ([#7357](https://github.com/craftcms/cms/issues/7357))
- Fixed a bug where `craft\elements\Asset::getSrcset()` could return the wrong value if the asset had a named transform set on it. ([#7352](https://github.com/craftcms/cms/issues/7352))
- Fixed a bug where the “All” checkbox label was getting HTML-encoded when using `Craft.ui.createCheckboxSelect()`.
- Fixed a bug where `Craft.formatNumber()` could format numbers based on the user’s preferred language rather than the preferred formatting locale.

## 3.5.17.1 - 2020-12-17

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
@@ -1,7 +1,7 @@
{
"name": "craftcms/cms",
"description": "Craft CMS",
"version": "3.5.17.1",
"version": "3.5.18",
"keywords": [
"cms",
"craftcms",
Expand Down
4 changes: 2 additions & 2 deletions lib/axios/axios.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/axios/axios.min.map

Large diffs are not rendered by default.

48 changes: 14 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -9,10 +9,10 @@
"@babel/core": "^7.10.1",
"@babel/preset-env": "^7.10.1",
"@benmajor/jquery-touch-events": "^2.0.3",
"axios": "^0.19.2",
"axios": "^0.21.1",
"babel-loader": "^8.1.0",
"blueimp-file-upload": "^10.31.0",
"craftcms-sass": "^3.5.2",
"craftcms-sass": "^3.5.3",
"d3": "^4.11.0",
"d3-format": "^1.4.4",
"d3-time-format": "^2.2.3",
Expand Down
14 changes: 11 additions & 3 deletions src/Craft.php
Expand Up @@ -280,10 +280,18 @@ private static function _generateCustomFieldBehavior(array $fieldHandles, string
include $filePath;
}

// Delete any other CustomFieldBehavior files
// Delete any CustomFieldBehavior files that are over 10 seconds old
$basename = basename($filePath);
$time = time() - 10;
FileHelper::clearDirectory($dir, [
'only' => ['CustomFieldBehavior*.php'],
'except' => [basename($filePath)],
'filter' => function(string $path) use($basename, $time): bool {
$b = basename($path);
return (
$b !== $basename &&
strpos($b, 'CustomFieldBehavior') === 0 &&
filemtime($path) < $time
);
},
]);
} else if ($load) {
// Just evaluate the code
Expand Down
91 changes: 90 additions & 1 deletion src/config/GeneralConfig.php
Expand Up @@ -102,7 +102,82 @@ class GeneralConfig extends BaseObject
* @see extraAllowedFileExtensions
* @group Assets
*/
public $allowedFileExtensions = ['7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'docx', 'fla', 'flv', 'gif', 'gz', 'gzip', 'htm', 'html', 'jp2', 'jpeg', 'jpg', 'jpx', 'js', 'json', 'm2t', 'mid', 'mov', 'mp3', 'mp4', 'm4a', 'm4v', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'ogg', 'ogv', 'pdf', 'png', 'potx', 'pps', 'ppsm', 'ppsx', 'ppt', 'pptm', 'pptx', 'ppz', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'svg', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vob', 'vsd', 'wav', 'webm', 'webp', 'wma', 'wmv', 'xls', 'xlsx', 'zip'];
public $allowedFileExtensions = [
'7z',
'aiff',
'asf',
'avi',
'bmp',
'csv',
'doc',
'docx',
'fla',
'flv',
'gif',
'gz',
'gzip',
'htm',
'html',
'jp2',
'jpeg',
'jpg',
'jpx',
'js',
'json',
'm2t',
'm4a',
'm4v',
'mid',
'mov',
'mp3',
'mp4',
'mpc',
'mpeg',
'mpg',
'ods',
'odt',
'ogg',
'ogv',
'pdf',
'png',
'potx',
'pps',
'ppsm',
'ppsx',
'ppt',
'pptm',
'pptx',
'ppz',
'pxd',
'qt',
'ram',
'rar',
'rm',
'rmi',
'rmvb',
'rtf',
'sdc',
'sitd',
'svg',
'swf',
'sxc',
'sxw',
'tar',
'tgz',
'tif',
'tiff',
'txt',
'vob',
'vsd',
'wav',
'webm',
'webp',
'wma',
'wmv',
'xls',
'xlsx',
'zip',
];

/**
* @var bool Whether users should be allowed to create similarly-named tags.
Expand Down Expand Up @@ -207,6 +282,7 @@ class GeneralConfig extends BaseObject
* See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
*
* @group System
* @defaultAlt 1 day
*/
public $cacheDuration = 86400;

Expand All @@ -230,6 +306,7 @@ class GeneralConfig extends BaseObject
* See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
*
* @group Security
* @defaultAlt 5 minutes
*/
public $cooldownDuration = 300;

Expand Down Expand Up @@ -383,6 +460,7 @@ class GeneralConfig extends BaseObject
* See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
*
* @group Security
* @defaultAlt 1 day
*/
public $defaultTokenDuration = 86400;

Expand All @@ -400,6 +478,7 @@ class GeneralConfig extends BaseObject
* - `6` – Saturday
*
* @group System
* @defaultAlt Monday
*/
public $defaultWeekStartDay = 1;

Expand Down Expand Up @@ -489,6 +568,7 @@ class GeneralConfig extends BaseObject
* See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
*
* @group Security
* @defaultAlt 5 minutes
*/
public $elevatedSessionDuration = 300;

Expand Down Expand Up @@ -654,6 +734,7 @@ class GeneralConfig extends BaseObject
* See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
*
* @group Security
* @defaultAlt 5 minutes
*/
public $invalidLoginWindowDuration = 3600;

Expand Down Expand Up @@ -761,6 +842,7 @@ class GeneralConfig extends BaseObject
*
* See [[ConfigHelper::sizeInBytes()]] for a list of supported value types.
* @group Assets
* @defaultAlt 16MB
*/
public $maxUploadFileSize = 16777216;

Expand Down Expand Up @@ -970,6 +1052,7 @@ class GeneralConfig extends BaseObject
*
* @since 3.3.0
* @group Garbage Collection
* @defaultAlt 90 days
*/
public $purgeStaleUserSessionDuration = 7776000;

Expand All @@ -982,6 +1065,7 @@ class GeneralConfig extends BaseObject
*
* @since 3.2.0
* @group Garbage Collection
* @defaultAlt 30 days
*/
public $purgeUnsavedDraftsDuration = 2592000;

Expand All @@ -993,6 +1077,7 @@ class GeneralConfig extends BaseObject
* See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
*
* @group Session
* @defaultAlt 1 year
*/
public $rememberUsernameDuration = 31536000;

Expand All @@ -1004,6 +1089,7 @@ class GeneralConfig extends BaseObject
* See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
*
* @group Session
* @defaultAlt 14 days
*/
public $rememberedUserSessionDuration = 1209600;

Expand Down Expand Up @@ -1228,6 +1314,7 @@ class GeneralConfig extends BaseObject
*
* @since 3.1.0
* @group Garbage Collection
* @defaultAlt 30 days
*/
public $softDeleteDuration = 2592000;

Expand Down Expand Up @@ -1387,6 +1474,7 @@ class GeneralConfig extends BaseObject
* See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
*
* @group Session
* @defaultAlt 1 hour
*/
public $userSessionDuration = 3600;

Expand Down Expand Up @@ -1415,6 +1503,7 @@ class GeneralConfig extends BaseObject
* See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
*
* @group Security
* @defaultAlt 1 day
*/
public $verificationCodeDuration = 86400;

Expand Down
2 changes: 1 addition & 1 deletion src/config/app.php
Expand Up @@ -3,7 +3,7 @@
return [
'id' => 'CraftCMS',
'name' => 'Craft CMS',
'version' => '3.5.17.1',
'version' => '3.5.18',
'schemaVersion' => '3.5.13',
'minVersionRequired' => '2.6.2788',
'basePath' => dirname(__DIR__), // Defines the @app alias
Expand Down
1 change: 1 addition & 0 deletions src/console/Application.php
Expand Up @@ -75,6 +75,7 @@ public function runAction($route, $params = [])
} else {
$infoTable = $this->getDb()->getSchema()->getRawTableName(Table::INFO);
// Figure out the exception that is getting thrown
$e = null;
try {
(new Query())->from([Table::INFO])->where(['id' => 1])->one();
} catch (\Throwable $e) {
Expand Down
3 changes: 3 additions & 0 deletions src/elements/Asset.php
Expand Up @@ -992,6 +992,9 @@ public function getSrcset(array $sizes)

$sizeTransform = $transform ? $transform->toArray() : [];

// Having handle or name here will override dimensions, so we don't want that.
unset($sizeTransform['handle'], $sizeTransform['name']);

if ($unit === 'w') {
$sizeTransform['width'] = (int)$value;
} else {
Expand Down

0 comments on commit b307136

Please sign in to comment.