Skip to content

Commit 380eb66

Browse files
author
Joan He
committed
Merge remote-tracking branch 'upstream/2.3-develop' into libs-upgrade
# Conflicts: # composer.json # composer.lock
2 parents 2b85778 + 4046856 commit 380eb66

File tree

44 files changed

+395
-104
lines changed

Some content is hidden

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

44 files changed

+395
-104
lines changed

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassRemove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ public function execute()
3939
$this->messageManager->addException($e, __("We couldn't remove the messages because of an error."));
4040
}
4141
}
42-
$this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
42+
$this->_redirect('adminhtml/*/');
4343
}
4444
}

app/code/Magento/Catalog/Block/Product/Image.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,19 @@
2020
class Image extends \Magento\Framework\View\Element\Template
2121
{
2222
/**
23+
* @deprecated Property isn't used
2324
* @var \Magento\Catalog\Helper\Image
2425
*/
2526
protected $imageHelper;
2627

2728
/**
29+
* @deprecated Property isn't used
2830
* @var \Magento\Catalog\Model\Product
2931
*/
3032
protected $product;
3133

3234
/**
35+
* @deprecated Property isn't used
3336
* @var array
3437
*/
3538
protected $attributes = [];

app/code/Magento/Catalog/Helper/Product/Configuration.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Catalog\Helper\Product;
77

88
use Magento\Framework\App\ObjectManager;
9+
use Magento\Framework\Escaper;
910
use Magento\Framework\Serialize\Serializer\Json;
1011
use Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface;
1112
use Magento\Framework\App\Helper\AbstractHelper;
@@ -43,6 +44,11 @@ class Configuration extends AbstractHelper implements ConfigurationInterface
4344
*/
4445
private $serializer;
4546

47+
/**
48+
* @var Escaper
49+
*/
50+
private $escaper;
51+
4652
/**
4753
* @param \Magento\Framework\App\Helper\Context $context
4854
* @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory
@@ -55,12 +61,14 @@ public function __construct(
5561
\Magento\Catalog\Model\Product\OptionFactory $productOptionFactory,
5662
\Magento\Framework\Filter\FilterManager $filter,
5763
\Magento\Framework\Stdlib\StringUtils $string,
58-
Json $serializer = null
64+
Json $serializer = null,
65+
Escaper $escaper = null
5966
) {
6067
$this->_productOptionFactory = $productOptionFactory;
6168
$this->filter = $filter;
6269
$this->string = $string;
6370
$this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
71+
$this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class);
6472
parent::__construct($context);
6573
}
6674

@@ -175,7 +183,7 @@ public function getFormattedOptionValue($optionValue, $params = null)
175183
if (isset($optionValue['option_id'])) {
176184
$optionInfo = $optionValue;
177185
if (isset($optionInfo['value'])) {
178-
$optionValue = $optionInfo['value'];
186+
$optionValue = $this->escaper->escapeHtml($optionInfo['value']);
179187
}
180188
} elseif (isset($optionValue['value'])) {
181189
$optionValue = $optionValue['value'];

app/code/Magento/Catalog/view/base/templates/product/price/default.phtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<?php
1212
/** @var \Magento\Catalog\Pricing\Render\FinalPriceBox $block */
1313

14-
$productId = $block->getSaleableItem()->getId();
15-
1614
/** ex: \Magento\Catalog\Pricing\Price\RegularPrice */
1715
/** @var \Magento\Framework\Pricing\Price\PriceInterface $priceModel */
1816
$priceModel = $block->getPriceType('regular_price');

app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<?php
1212
/** @var \Magento\Catalog\Pricing\Render\FinalPriceBox $block */
1313

14-
$productId = $block->getSaleableItem()->getId();
15-
1614
/** ex: \Magento\Catalog\Pricing\Price\RegularPrice */
1715
/** @var \Magento\Framework\Pricing\Price\PriceInterface $priceModel */
1816
$priceModel = $block->getPriceType('regular_price');

app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
</block>
131131
</container>
132132
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.details" template="Magento_Catalog::product/view/details.phtml" after="product.info.media">
133-
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
133+
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" as="description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
134134
<arguments>
135135
<argument name="at_call" xsi:type="string">getDescription</argument>
136136
<argument name="at_code" xsi:type="string">description</argument>

app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ define([
9797
success: function (res) {
9898
var eventData, parameters;
9999

100-
$(document).trigger('ajax:addToCart', form.data().productSku, form, res);
100+
$(document).trigger('ajax:addToCart', {
101+
'sku': form.data().productSku,
102+
'form': form,
103+
'response': res
104+
});
101105

102106
if (self.isLoaderEnabled()) {
103107
$('body').trigger(self.options.processStop);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<span data-bind="html: option.value.join('<br>')"></span>
4646
<!-- /ko -->
4747
<!-- ko ifnot: Array.isArray(option.value) -->
48-
<span data-bind="html: option.value"></span>
48+
<span data-bind="text: option.value"></span>
4949
<!-- /ko -->
5050
</dd>
5151
<!-- /ko -->

app/code/Magento/Checkout/view/frontend/web/template/summary/item/details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<dd class="values" data-bind="html: full_view"></dd>
3636
<!-- /ko -->
3737
<!-- ko ifnot: ($data.full_view)-->
38-
<dd class="values" data-bind="html: value"></dd>
38+
<dd class="values" data-bind="text: value"></dd>
3939
<!-- /ko -->
4040
<!-- /ko -->
4141
</dl>

app/code/Magento/Config/Model/ResourceModel/Config.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Config\Model\ResourceModel;
77

8+
use Magento\Framework\App\Config\ScopeConfigInterface;
9+
810
/**
911
* Core Resource Resource Model
1012
*
@@ -34,7 +36,7 @@ protected function _construct()
3436
* @param int $scopeId
3537
* @return $this
3638
*/
37-
public function saveConfig($path, $value, $scope, $scopeId)
39+
public function saveConfig($path, $value, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0)
3840
{
3941
$connection = $this->getConnection();
4042
$select = $connection->select()->from(
@@ -70,7 +72,7 @@ public function saveConfig($path, $value, $scope, $scopeId)
7072
* @param int $scopeId
7173
* @return $this
7274
*/
73-
public function deleteConfig($path, $scope, $scopeId)
75+
public function deleteConfig($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0)
7476
{
7577
$connection = $this->getConnection();
7678
$connection->delete(

0 commit comments

Comments
 (0)