Skip to content

Commit a202112

Browse files
authored
Merge pull request #5536 from magento-performance/MC-32574
MC-32574
2 parents d69c242 + 5d8e95e commit a202112

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

app/code/Magento/Customer/CustomerData/SectionConfigConverter.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,7 @@ public function convert($source)
2424
foreach ($source->getElementsByTagName('action') as $action) {
2525
$actionName = strtolower($action->getAttribute('name'));
2626
foreach ($action->getElementsByTagName('section') as $section) {
27-
$sectionName = strtolower($section->getAttribute('name'));
28-
29-
if ($sectionName === self::INVALIDATE_ALL_SECTIONS_MARKER) {
30-
$sections[$actionName] = [];
31-
$sections[$actionName][] = self::INVALIDATE_ALL_SECTIONS_MARKER;
32-
break;
33-
} else {
34-
$sections[$actionName][] = $sectionName;
35-
}
27+
$sections[$actionName][] = strtolower($section->getAttribute('name'));
3628
}
3729
if (!isset($sections[$actionName])) {
3830
$sections[$actionName][] = self::INVALIDATE_ALL_SECTIONS_MARKER;

app/code/Magento/Customer/Test/Unit/CustomerData/SectionConfigConverterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public function testConvert()
7575
'sections' => [
7676
'sales/guest/reorder' => ['account'],
7777
'sales/order/reorder' => ['account', 'cart'],
78-
'stores/store/switch' => ['*'],
78+
'stores/store/switch' => ['account', '*', 'cart'],
7979
'directory/currency/switch' => ['*'],
8080
'customer/account/logout' => ['account', 'cart'],
8181
'customer/account/editpost' => ['account', 'acc', 'cart'],
82-
'checkout/cart/delete' => ['*'],
83-
'customer/account/createpost' => ['*'],
82+
'checkout/cart/delete' => ['account', 'acc', 'cart', '*'],
83+
'customer/account/createpost' => ['account','*'],
8484
'catalog/product_compare/add' => ['*'],
8585
'catalog/product_compare/remove' => ['account', 'acc'],
8686
'catalog/product_compare/clear' => ['*'],

0 commit comments

Comments
 (0)