Skip to content

Commit d2494a8

Browse files
author
Stanislav Idolov
authored
🔃 [EngCom] Public Pull Requests - 2.1-develop
Accepted Public Pull Requests: - #16102: [Backport] fixed word typo (by @hitesh-wagento) - #16130: [Backport] Disabling sorting in glob and scandir functions for better performance (by @lfluvisotto) - #16037: [Backport] Fix issue #15832 (by @chirag-wagento) - #16111: [Backport] Correct typo correction js files (by @hitesh-wagento) Fixed GitHub Issues: - #15832: No button-primary__font-weight (reported by @DanielRuf) has been fixed in #16037 by @chirag-wagento in 2.1-develop branch Related commits: 1. 324ee50 2. 41b4775
2 parents d031a92 + 0b1c1c2 commit d2494a8

File tree

12 files changed

+22
-13
lines changed

12 files changed

+22
-13
lines changed

app/code/Magento/Ui/view/base/web/js/form/element/file-uploader.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ define([
127127

128128
/**
129129
* Retrieves from the list file which matches
130-
* search criteria implemented in itertor function.
130+
* search criteria implemented in iterator function.
131131
*
132132
* @param {Function} fn - Function that will be invoked
133133
* for each file in the list.
@@ -185,7 +185,7 @@ define([
185185
},
186186

187187
/**
188-
* Returns path to the files' preview image.
188+
* Returns path to the file's preview image.
189189
*
190190
* @param {Object} file
191191
* @returns {String}
@@ -284,7 +284,7 @@ define([
284284

285285
/**
286286
* Abstract handler which is invoked when files are choosed for upload.
287-
* May be used for implementation of aditional validation rules,
287+
* May be used for implementation of additional validation rules,
288288
* e.g. total files and a total size rules.
289289
*
290290
* @abstract

dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function getPhpFiles($changedFilesList, $fileTypes = 0)
3131
$fileUtilities = Files::init();
3232
if (isset($_ENV['INCREMENTAL_BUILD'])) {
3333
$phpFiles = [];
34-
foreach (glob($changedFilesList) as $listFile) {
34+
foreach (glob($changedFilesList, GLOB_NOSORT) as $listFile) {
3535
$phpFiles = array_merge($phpFiles, file($listFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
3636
}
3737
array_walk(

lib/internal/Magento/Framework/App/Utility/Files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ public function getMainConfigFiles($asDataSet = true)
382382
$configXmlPaths = array_merge($globPaths, $configXmlPaths);
383383
$files = [];
384384
foreach ($configXmlPaths as $xmlPath) {
385-
$files = array_merge($files, glob($xmlPath));
385+
$files = array_merge($files, glob($xmlPath, GLOB_NOSORT));
386386
}
387387
self::$_cache[$cacheKey] = $files;
388388
}

lib/internal/Magento/Framework/Archive/Tar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ protected function _createTar($skipRoot = false, $finalize = false)
252252
$file = $this->_getCurrentFile();
253253

254254
if (is_dir($file)) {
255-
$dirFiles = scandir($file);
255+
$dirFiles = scandir($file, SCANDIR_SORT_NONE);
256256

257257
if (false === $dirFiles) {
258258
throw new \Magento\Framework\Exception\LocalizedException(

lib/internal/Magento/Framework/Backup/Test/Unit/_files/app_dirs_rollback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
}
1717

18-
$files = glob(TESTS_TEMP_DIR . '/Magento/Backup/data/*');
18+
$files = glob(TESTS_TEMP_DIR . '/Magento/Backup/data/*', GLOB_NOSORT);
1919
foreach ($files as $file) {
2020
unlink($file);
2121
}

lib/internal/Magento/Framework/Data/Collection/Filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ protected function _collectRecursive($dir)
241241
$dir = [$dir];
242242
}
243243
foreach ($dir as $folder) {
244-
if ($nodes = glob($folder . '/*')) {
244+
if ($nodes = glob($folder . '/*', GLOB_NOSORT)) {
245245
foreach ($nodes as $node) {
246246
$collectedResult[] = $node;
247247
}

lib/internal/Magento/Framework/Filesystem/Io/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ protected static function _recursiveCallback($dir, array $fileCallback, array $d
364364
$dirCallback = $fileCallback;
365365
}
366366
if (is_dir($dir)) {
367-
foreach (scandir($dir) as $item) {
367+
foreach (scandir($dir, SCANDIR_SORT_NONE) as $item) {
368368
if (!strcmp($item, '.') || !strcmp($item, '..')) {
369369
continue;
370370
}

lib/internal/Magento/Framework/Validator/Test/Unit/ConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function testConstructException()
4848
protected function _initConfig(array $files = null)
4949
{
5050
if (null === $files) {
51-
$files = glob(__DIR__ . '/_files/validation/positive/*/validation.xml');
51+
$files = glob(__DIR__ . '/_files/validation/positive/*/validation.xml', GLOB_NOSORT);
5252
}
5353
$configFiles = [];
5454
foreach ($files as $path) {

lib/web/css/source/lib/_buttons.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@
277277
// ---------------------------------------------
278278

279279
.lib-button-primary(
280+
@_button-font-family: @button-primary__font-family,
281+
@_button-font-size: @button-primary__font-size,
282+
@_button-font-weight: @button-primary__font-weight,
280283
@_button-line-height: @button-primary__line-height,
281284
@_button-width: @button-primary__width,
282285
@_button-margin: @button-primary__margin,
@@ -300,6 +303,9 @@
300303
@_button-gradient-direction: @button-primary__gradient-direction
301304
) {
302305
.lib-button(
306+
@_button-font-family: @_button-font-family,
307+
@_button-font-size: @_button-font-size,
308+
@_button-font-weight: @_button-font-weight,
303309
@_button-line-height: @_button-line-height,
304310
@_button-width: @_button-width,
305311
@_button-margin: @_button-margin,

lib/web/css/source/lib/variables/_buttons.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
@button__active__gradient-color-end: false;
4848

4949
// Primary button
50+
@button-primary__font-family: @button__font-family;
51+
@button-primary__font-size: @button__font-size;
52+
@button-primary__font-weight: @button__font-weight;
5053
@button-primary__line-height: false;
5154
@button-primary__width: false;
5255
@button-primary__margin: false;

0 commit comments

Comments
 (0)