Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit d3203b0

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop Minor Fixes
Accepted Public Pull Requests: - magento/magento2#21030: Rename LESS var names to 'darker' vs 'darkie' (by @philwinkle) - magento/magento2#20861: Fixed Checkbox radio shadow 20859 (by @abrarpathan19) - magento/magento2#20109: Reverting javascript translation refactoring which broke javascript translation (by @mfickers) - magento/magento2#20383: issue fixed #20382 (by @irajneeshgupta) - magento/magento2#20565: Number of Lines in a Street Address not setting to default when you checked Use system value in Magento 2.1.7 #13675 (by @XxXgeoXxX) - magento/magento2#20803: [Backend] Fixed the dashboard statistics refreshing button (by @eduard13) - magento/magento2#20787: [CMS] Improving the uploaded images styling view (by @eduard13) - magento/magento2#19798: Fixed store switcher doesn't work multistore setup with different product urls issue (by @janakbhimani) - magento/magento2#20775: Krishna221993 patch 1 typo fixed (by @krishna221993) - magento/magento2#17424: Support for non-FQN classes on web-API interfaces. (by @phoenix128) - magento/magento2#20770: Fix Model\Widget#getConfigAsObject losing it's type declaration (by @Stoux) - magento/magento2#20769: Fixed issue when only first custom option was validated (by @elevinskii) - magento/magento2#20436: Granular Magento_Customer ACL (by @kassner) - magento/magento2#20159: Fixed issue #20157 On advanced search page Price field misaligned on mobile view (by @GovindaSharma) - magento/magento2#18978: Integration Test Framework AMQP Helper Flexibility (by @pmclain) Fixed GitHub Issues: - magento/magento2#20859: Luma theme - Input Box and Radio Button shadow is not proper (reported by @saphaljha) has been fixed in magento/magento2#20861 by @abrarpathan19 in 2.3-develop branch Related commits: 1. 5f258f2 2. 394665f 3. 2cf9413 - magento/magento2#19705: Javascript translation issue on modal buttons when removing items from product compare page (reported by @mfickers) has been fixed in magento/magento2#20109 by @mfickers in 2.3-develop branch Related commits: 1. dbf5c45 2. a185ca1 - magento/magento2#20382: View and Edit Cart link not aligned in middle because bellow the link a blank div (class="minicart-widgets") existing has 15px margin top, this div (class="minicart-widgets" ) should be display none or should not come if has no content, should only display if has content (reported by @irajneeshgupta) has been fixed in magento/magento2#20383 by @irajneeshgupta in 2.3-develop branch Related commits: 1. 5aa0cd0 - magento/magento2#13675: Magento 2 :- Number of Lines in a Street Address not setting to default when you checked Use system value in Magento 2.1.7 (reported by @pradeeprcs) has been fixed in magento/magento2#20565 by @XxXgeoXxX in 2.3-develop branch Related commits: 1. f3d410b - magento/magento2#20802: [Backend] Dashboard Refresh Statistics action redirects to 404 (reported by @eduard13) has been fixed in magento/magento2#20803 by @eduard13 in 2.3-develop branch Related commits: 1. 124a42f 2. beffcf1 3. c1f45e6 4. d20c863 - magento/magento2#20786: [CMS] File upload preview style issue (reported by @eduard13) has been fixed in magento/magento2#20787 by @eduard13 in 2.3-develop branch Related commits: 1. 0614a9a 2. 24221c9 - magento/magento2#19714: Store switcher doesn't work multistore setup with different product urls (reported by @sreichel) has been fixed in magento/magento2#19798 by @janakbhimani in 2.3-develop branch Related commits: 1. 927ca80 2. b36dc04 3. 3d882cf 4. c7b4aae 5. 54a4039 6. 618d8e3 7. 8a05dbb - magento/magento2#1537: Admin menu not showing of my custom module (reported by @Hiteshbb) has been fixed in magento/magento2#17424 by @phoenix128 in 2.3-develop branch Related commits: 1. f281a05 2. a0379a4 3. 368969a 4. 1530c69 5. 3d0cb54 6. 2232338 7. e858f36 8. 13353c8 9. 25a5e5b 10. 229a29a - magento/magento2#20157: On advanced search page Price field misaligned on mobile view (reported by @ajay2jcommerce) has been fixed in magento/magento2#20159 by @GovindaSharma in 2.3-develop branch Related commits: 1. 47f5132 2. 81cd0d4 3. 2353329 4. 10f5378 - magento/magento2#18953: Integration Test AMQP Helper Hardcoded Host (reported by @pmclain) has been fixed in magento/magento2#18978 by @pmclain in 2.3-develop branch Related commits: 1. 789bc9a 2. 5d2c8c9 3. 364166e 4. d711fca 5. a1b6eee 6. dc8b170
2 parents 3ef3885 + 6128c5a commit d3203b0

File tree

51 files changed

+719
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+719
-133
lines changed

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/RefreshStatistics.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66

77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
class RefreshStatistics extends \Magento\Reports\Controller\Adminhtml\Report\Statistics
9+
use Magento\Framework\App\Action\HttpPostActionInterface;
10+
use Magento\Reports\Controller\Adminhtml\Report\Statistics;
11+
12+
/**
13+
* Refresh Dashboard statistics action.
14+
*/
15+
class RefreshStatistics extends Statistics implements HttpPostActionInterface
1016
{
1117
/**
1218
* @param \Magento\Backend\App\Action\Context $context
@@ -25,6 +31,8 @@ public function __construct(
2531
}
2632

2733
/**
34+
* Refresh statistics.
35+
*
2836
* @return \Magento\Backend\Model\View\Result\Redirect
2937
*/
3038
public function execute()

app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,10 @@ protected function _initMessageTemplates()
431431
);
432432
$this->_productEntity->addMessageTemplate(
433433
self::ERROR_INVALID_TYPE,
434-
__('Value for \'type\' sub attribute in \'custom_options\' attribute contains incorrect value, acceptable values are: \'dropdown\', \'checkbox\'')
434+
__(
435+
'Value for \'type\' sub attribute in \'custom_options\' attribute contains incorrect value, acceptable values are: %1',
436+
'\''.implode('\', \'', array_keys($this->_specificTypes)).'\''
437+
)
435438
);
436439
$this->_productEntity->addMessageTemplate(self::ERROR_EMPTY_TITLE, __('Please enter a value for title.'));
437440
$this->_productEntity->addMessageTemplate(
@@ -629,7 +632,7 @@ public function validateAmbiguousData()
629632
$this->_addRowsErrors(self::ERROR_AMBIGUOUS_NEW_NAMES, $errorRows);
630633
return false;
631634
}
632-
if ($this->getBehavior() == \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND) {
635+
if ($this->getBehavior() == Import::BEHAVIOR_APPEND) {
633636
$errorRows = $this->_findOldOptionsWithTheSameTitles();
634637
if ($errorRows) {
635638
$this->_addRowsErrors(self::ERROR_AMBIGUOUS_OLD_NAMES, $errorRows);
@@ -967,11 +970,10 @@ public function validateRow(array $rowData, $rowNumber)
967970
return false;
968971
}
969972
}
970-
return true;
971973
}
972974
}
973975

974-
return false;
976+
return true;
975977
}
976978

977979
/**
@@ -1381,7 +1383,7 @@ private function setLastOptionTitle(array &$titles) : void
13811383
*/
13821384
private function removeExistingOptions(array $products, array $optionsToRemove): void
13831385
{
1384-
if ($this->getBehavior() != \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND) {
1386+
if ($this->getBehavior() != Import::BEHAVIOR_APPEND) {
13851387
$this->_deleteEntities(array_keys($products));
13861388
} elseif (!empty($optionsToRemove)) {
13871389
// Remove options for products with empty "custom_options" row
@@ -2108,7 +2110,7 @@ private function savePreparedCustomOptions(
21082110
array $types
21092111
): void {
21102112
if ($this->_isReadyForSaving($options, $titles, $types['values'])) {
2111-
if ($this->getBehavior() == \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND) {
2113+
if ($this->getBehavior() == Import::BEHAVIOR_APPEND) {
21122114
$this->_compareOptionsWithExisting($options, $titles, $prices, $types['values']);
21132115
$this->restoreOriginalOptionTypeIds($types['values'], $types['prices'], $types['titles']);
21142116
}

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/OptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ public function testValidateRowNoCustomOption()
702702
{
703703
$rowData = include __DIR__ . '/_files/row_data_no_custom_option.php';
704704
$this->_bypassModelMethodGetMultiRowFormat($rowData);
705-
$this->assertFalse($this->modelMock->validateRow($rowData, 0));
705+
$this->assertTrue($this->modelMock->validateRow($rowData, 0));
706706
}
707707

708708
/**

app/code/Magento/CatalogSearch/Model/ResourceModel/Advanced/Collection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*
2222
* This collection should be refactored to not have dependencies on MySQL-specific implementation.
2323
*
24+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2425
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2526
* @api
2627
* @since 100.0.2
@@ -296,7 +297,7 @@ private function getSearchCriteriaBuilder()
296297
}
297298

298299
/**
299-
* Get fielter builder.
300+
* Get filter builder.
300301
*
301302
* @return FilterBuilder
302303
*/

app/code/Magento/Checkout/view/frontend/web/template/minicart/content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
</div>
9898
</div>
9999

100-
<div id="minicart-widgets" class="minicart-widgets">
100+
<div id="minicart-widgets" class="minicart-widgets" if="getRegion('promotion').length">
101101
<each args="getRegion('promotion')" render=""/>
102102
</div>
103103
</div>

app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $_height = $block->getImagesHeight();
2121
data-size="<?= $block->escapeHtmlAttr($file->getSize()) ?>"
2222
data-mime-type="<?= $block->escapeHtmlAttr($file->getMimeType()) ?>"
2323
>
24-
<p class="nm" style="height:<?= $block->escapeHtmlAttr($_height) ?>px;width:<?= $block->escapeHtmlAttr($_width) ?>px;">
24+
<p class="nm" style="height:<?= $block->escapeHtmlAttr($_height) ?>px;">
2525
<?php if ($block->getFileThumbUrl($file)):?>
2626
<img src="<?= $block->escapeHtmlAttr($block->getFileThumbUrl($file)) ?>" alt="<?= $block->escapeHtmlAttr($block->getFileName($file)) ?>"/>
2727
<?php endif; ?>

app/code/Magento/Customer/Block/Adminhtml/Edit/DeleteButton.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/**
1212
* Class DeleteButton
13+
*
1314
* @package Magento\Customer\Block\Adminhtml\Edit
1415
*/
1516
class DeleteButton extends GenericButton implements ButtonProviderInterface
@@ -36,6 +37,8 @@ public function __construct(
3637
}
3738

3839
/**
40+
* Get button data.
41+
*
3942
* @return array
4043
*/
4144
public function getButtonData()
@@ -53,12 +56,15 @@ public function getButtonData()
5356
],
5457
'on_click' => '',
5558
'sort_order' => 20,
59+
'aclResource' => 'Magento_Customer::delete',
5660
];
5761
}
5862
return $data;
5963
}
6064

6165
/**
66+
* Get delete url.
67+
*
6268
* @return string
6369
*/
6470
public function getDeleteUrl()

app/code/Magento/Customer/Block/Adminhtml/Edit/InvalidateTokenButton.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99

1010
/**
1111
* Class InvalidateTokenButton
12+
*
1213
* @package Magento\Customer\Block\Adminhtml\Edit
1314
*/
1415
class InvalidateTokenButton extends GenericButton implements ButtonProviderInterface
1516
{
1617
/**
18+
* Get button data.
19+
*
1720
* @return array
1821
*/
1922
public function getButtonData()
@@ -27,12 +30,15 @@ public function getButtonData()
2730
'class' => 'invalidate-token',
2831
'on_click' => 'deleteConfirm("' . $deleteConfirmMsg . '", "' . $this->getInvalidateTokenUrl() . '")',
2932
'sort_order' => 65,
33+
'aclResource' => 'Magento_Customer::invalidate_tokens',
3034
];
3135
}
3236
return $data;
3337
}
3438

3539
/**
40+
* Get invalidate token url.
41+
*
3642
* @return string
3743
*/
3844
public function getInvalidateTokenUrl()

app/code/Magento/Customer/Block/Adminhtml/Edit/ResetPasswordButton.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function getButtonData()
2727
'class' => 'reset reset-password',
2828
'on_click' => sprintf("location.href = '%s';", $this->getResetPasswordUrl()),
2929
'sort_order' => 60,
30+
'aclResource' => 'Magento_Customer::reset_password',
3031
];
3132
}
3233
return $data;

app/code/Magento/Customer/Controller/Adminhtml/Customer/InvalidateToken.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\Customer\Controller\Adminhtml\Customer;
99

10+
use Magento\Framework\App\Action\HttpGetActionInterface;
1011
use Magento\Integration\Api\CustomerTokenServiceInterface;
1112
use Magento\Customer\Api\AccountManagementInterface;
1213
use Magento\Customer\Api\AddressRepositoryInterface;
@@ -25,8 +26,15 @@
2526
* @SuppressWarnings(PHPMD.TooManyFields)
2627
* @SuppressWarnings(PHPMD.NumberOfChildren)
2728
*/
28-
class InvalidateToken extends \Magento\Customer\Controller\Adminhtml\Index
29+
class InvalidateToken extends \Magento\Customer\Controller\Adminhtml\Index implements HttpGetActionInterface
2930
{
31+
/**
32+
* Authorization level of a basic admin session
33+
*
34+
* @see _isAllowed()
35+
*/
36+
const ADMIN_RESOURCE = 'Magento_Customer::invalidate_tokens';
37+
3038
/**
3139
* @var CustomerTokenServiceInterface
3240
*/

app/code/Magento/Customer/Controller/Adminhtml/Index/Delete.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,18 @@
88
use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface;
99
use Magento\Framework\Controller\ResultFactory;
1010

11+
/**
12+
* Delete customer action.
13+
*/
1114
class Delete extends \Magento\Customer\Controller\Adminhtml\Index implements HttpPostActionInterface
1215
{
16+
/**
17+
* Authorization level of a basic admin session
18+
*
19+
* @see _isAllowed()
20+
*/
21+
const ADMIN_RESOURCE = 'Magento_Customer::delete';
22+
1323
/**
1424
* Delete customer action
1525
*

app/code/Magento/Customer/Controller/Adminhtml/Index/MassDelete.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
*/
1919
class MassDelete extends AbstractMassAction implements HttpPostActionInterface
2020
{
21+
/**
22+
* Authorization level of a basic admin session
23+
*
24+
* @see _isAllowed()
25+
*/
26+
const ADMIN_RESOURCE = 'Magento_Customer::delete';
27+
2128
/**
2229
* @var CustomerRepositoryInterface
2330
*/
@@ -40,8 +47,7 @@ public function __construct(
4047
}
4148

4249
/**
43-
* @param AbstractCollection $collection
44-
* @return \Magento\Backend\Model\View\Result\Redirect
50+
* @inheritdoc
4551
*/
4652
protected function massAction(AbstractCollection $collection)
4753
{

app/code/Magento/Customer/Controller/Adminhtml/Index/ResetPassword.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616
*/
1717
class ResetPassword extends \Magento\Customer\Controller\Adminhtml\Index implements HttpGetActionInterface
1818
{
19+
/**
20+
* Authorization level of a basic admin session
21+
*
22+
* @see _isAllowed()
23+
*/
24+
const ADMIN_RESOURCE = 'Magento_Customer::reset_password';
25+
1926
/**
2027
* Reset password handler
2128
*

app/code/Magento/Customer/Model/Config/Backend/Address/Street.php

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,20 @@ public function afterDelete()
8787
{
8888
$result = parent::afterDelete();
8989

90-
if ($this->getScope() == \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES) {
91-
$attribute = $this->_eavConfig->getAttribute('customer_address', 'street');
92-
$website = $this->_storeManager->getWebsite($this->getScopeCode());
93-
$attribute->setWebsite($website);
94-
$attribute->load($attribute->getId());
95-
$attribute->setData('scope_multiline_count', null);
96-
$attribute->save();
97-
}
90+
$attribute = $this->_eavConfig->getAttribute('customer_address', 'street');
91+
switch ($this->getScope()) {
92+
case \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES:
93+
$website = $this->_storeManager->getWebsite($this->getScopeCode());
94+
$attribute->setWebsite($website);
95+
$attribute->load($attribute->getId());
96+
$attribute->setData('scope_multiline_count', null);
97+
break;
9898

99+
case ScopeConfigInterface::SCOPE_TYPE_DEFAULT:
100+
$attribute->setData('multiline_count', 2);
101+
break;
102+
}
103+
$attribute->save();
99104
return $result;
100105
}
101106
}

app/code/Magento/Customer/etc/acl.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010
<resources>
1111
<resource id="Magento_Backend::admin">
1212
<resource id="Magento_Customer::customer" title="Customers" translate="title" sortOrder="40">
13-
<resource id="Magento_Customer::manage" title="All Customers" translate="title" sortOrder="10" />
13+
<resource id="Magento_Customer::manage" title="All Customers" translate="title" sortOrder="10">
14+
<resource id="Magento_Customer::actions" title="Actions" translate="title" sortOrder="10">
15+
<resource id="Magento_Customer::delete" title="Delete" translate="title" sortOrder="10" />
16+
<resource id="Magento_Customer::reset_password" title="Reset password" translate="title" sortOrder="20" />
17+
<resource id="Magento_Customer::invalidate_tokens" title="Invalidate tokens" translate="title" sortOrder="30" />
18+
</resource>
19+
</resource>
1420
<resource id="Magento_Customer::online" title="Now Online" translate="title" sortOrder="20" />
1521
<resource id="Magento_Customer::group" title="Customer Groups" translate="title" sortOrder="30" />
1622
</resource>

app/code/Magento/Translation/Block/Js.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
use Magento\Framework\View\Element\Template;
1010
use Magento\Translation\Model\Js\Config;
11-
use Magento\Framework\Escaper;
1211

1312
/**
13+
* JS translation block
14+
*
1415
* @api
1516
* @since 100.0.2
1617
*/
@@ -54,7 +55,7 @@ public function dictionaryEnabled()
5455
}
5556

5657
/**
57-
* gets current js-translation.json timestamp
58+
* Gets current js-translation.json timestamp
5859
*
5960
* @return string
6061
*/
@@ -64,6 +65,8 @@ public function getTranslationFileTimestamp()
6465
}
6566

6667
/**
68+
* Get translation file path
69+
*
6770
* @return string
6871
*/
6972
public function getTranslationFilePath()

0 commit comments

Comments
 (0)