Skip to content

Commit b2a75ff

Browse files
merge magento/2.3-develop into magento-qwerty/MAGETWO-55809
2 parents 65a3242 + 62c3829 commit b2a75ff

File tree

6 files changed

+84
-26
lines changed

6 files changed

+84
-26
lines changed

app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<a href="#"
2121
onclick="tree.collapseTree(); return false;"><?= $block->escapeHtml(__('Collapse All')) ?></a>
2222
<span class="separator">|</span> <a href="#"
23-
onclick="tree.expandTree(); return false;"><?= $block->escapeHtml(_('Expand All')) ?></a>
23+
onclick="tree.expandTree(); return false;"><?= $block->escapeHtml(__('Expand All')) ?></a>
2424
<?php endif; ?>
2525
</div>
2626
<?php if ($block->getRoot()) :?>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ $formName = $block->getFormName();
175175
<label class="admin__field-label">
176176
<span><?= $block->escapeHtml(__('Image Size')) ?></span>
177177
</label>
178-
<div class="admin__field-value" data-message="<?= $block->escapeHtmlAttr(_('{size}')) ?>"></div>
178+
<div class="admin__field-value" data-message="<?= $block->escapeHtmlAttr(__('{size}')) ?>"></div>
179179
</div>
180180

181181
<div class="admin__field admin__field-inline field-image-resolution" data-role="resolution">

app/code/Magento/Theme/etc/system.xml

Lines changed: 0 additions & 19 deletions
This file was deleted.

app/code/Magento/Ui/Component/Form/Element/AbstractOptionsField.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
use Magento\Framework\View\Element\UiComponent\ContextInterface;
1010

1111
/**
12+
* Base abstract form element.
13+
*
14+
* phpcs:disable Magento2.Classes.AbstractApi
1215
* @api
1316
* @since 100.1.0
1417
*/
@@ -59,7 +62,7 @@ public function prepare()
5962
if (empty($config['rawOptions'])) {
6063
$options = $this->convertOptionsValueToString($options);
6164
}
62-
$config['options'] = array_values(array_merge_recursive($config['options'], $options));
65+
$config['options'] = array_values(array_replace_recursive($config['options'], $options));
6366
}
6467
$this->setData('config', (array)$config);
6568
parent::prepare();
@@ -84,11 +87,14 @@ abstract public function getIsSelected($optionValue);
8487
*/
8588
protected function convertOptionsValueToString(array $options)
8689
{
87-
array_walk($options, function (&$value) {
88-
if (isset($value['value']) && is_scalar($value['value'])) {
89-
$value['value'] = (string)$value['value'];
90+
array_walk(
91+
$options,
92+
static function (&$value) {
93+
if (isset($value['value']) && is_scalar($value['value'])) {
94+
$value['value'] = (string)$value['value'];
95+
}
9096
}
91-
});
97+
);
9298
return $options;
9399
}
94100
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
// phpcs:ignore Magento2.Security.IncludeFile
9+
require_once __DIR__ . '/second_store.php';
10+
11+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
12+
$store = $objectManager->create(\Magento\Store\Model\Store::class);
13+
if ($storeId = $store->load('fixture_second_store', 'code')->getId()) {
14+
/** @var \Magento\Config\Model\ResourceModel\Config $configResource */
15+
$configResource = $objectManager->get(\Magento\Config\Model\ResourceModel\Config::class);
16+
$configResource->saveConfig(
17+
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_DEFAULT,
18+
'EUR',
19+
\Magento\Store\Model\ScopeInterface::SCOPE_STORES,
20+
$storeId
21+
);
22+
$configResource->saveConfig(
23+
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_ALLOW,
24+
'EUR',
25+
\Magento\Store\Model\ScopeInterface::SCOPE_STORES,
26+
$storeId
27+
);
28+
/**
29+
* Configuration cache clean is required to reload currency setting
30+
*/
31+
/** @var Magento\Config\App\Config\Type\System $config */
32+
$config = $objectManager->get(\Magento\Config\App\Config\Type\System::class);
33+
$config->clean();
34+
}
35+
36+
37+
/** @var \Magento\Directory\Model\ResourceModel\Currency $rate */
38+
$rate = $objectManager->create(\Magento\Directory\Model\ResourceModel\Currency::class);
39+
$rate->saveRates(
40+
[
41+
'USD' => ['EUR' => 2],
42+
'EUR' => ['USD' => 0.5]
43+
]
44+
);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
9+
$store = $objectManager->create(\Magento\Store\Model\Store::class);
10+
$storeId = $store->load('fixture_second_store', 'code')->getId();
11+
12+
if ($storeId) {
13+
$configResource = $objectManager->get(\Magento\Config\Model\ResourceModel\Config::class);
14+
$configResource->deleteConfig(
15+
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_DEFAULT,
16+
\Magento\Store\Model\ScopeInterface::SCOPE_STORES,
17+
$storeId
18+
);
19+
$configResource->deleteConfig(
20+
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_ALLOW,
21+
\Magento\Store\Model\ScopeInterface::SCOPE_STORES,
22+
$storeId
23+
);
24+
}
25+
26+
// phpcs:ignore Magento2.Security.IncludeFile
27+
require_once 'second_store_rollback.php';

0 commit comments

Comments
 (0)