Skip to content

Commit 914a5d4

Browse files
committed
Merge branch '2.3-develop' into 2.3-dev-pan-2.3.5
2 parents 12bf1c2 + 80af302 commit 914a5d4

File tree

216 files changed

+6894
-2125
lines changed

Some content is hidden

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

216 files changed

+6894
-2125
lines changed

app/code/Magento/AdminNotification/etc/adminhtml/menu.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
99
<menu>
10-
<add id="Magento_AdminNotification::system_adminnotification" title="Notifications" translate="title" module="Magento_AdminNotification" sortOrder="10" parent="Magento_Backend::system_other_settings" action="adminhtml/notification" resource="Magento_AdminNotification::adminnotification"/>
10+
<add id="Magento_AdminNotification::system_adminnotification" title="Notifications" translate="title" module="Magento_AdminNotification" sortOrder="10" parent="Magento_Backend::system_other_settings" action="adminhtml/notification" resource="Magento_AdminNotification::adminnotification"/>
1111
</menu>
1212
</config>

app/code/Magento/AdvancedSearch/Model/ResourceModel/Index.php

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Magento\Catalog\Model\Indexer\Category\Product\AbstractAction;
1717
use Magento\Framework\Search\Request\IndexScopeResolverInterface as TableResolver;
1818
use Magento\Catalog\Model\Indexer\Product\Price\DimensionCollectionFactory;
19+
use Magento\Store\Model\Indexer\WebsiteDimensionProvider;
1920

2021
/**
2122
* @api
@@ -47,12 +48,17 @@ class Index extends AbstractDb
4748
*/
4849
private $dimensionCollectionFactory;
4950

51+
/**
52+
* @var int|null
53+
*/
54+
private $websiteId;
55+
5056
/**
5157
* Index constructor.
5258
* @param Context $context
5359
* @param StoreManagerInterface $storeManager
5460
* @param MetadataPool $metadataPool
55-
* @param null $connectionName
61+
* @param string|null $connectionName
5662
* @param TableResolver|null $tableResolver
5763
* @param DimensionCollectionFactory|null $dimensionCollectionFactory
5864
*/
@@ -94,12 +100,17 @@ protected function _getCatalogProductPriceData($productIds = null)
94100
$catalogProductIndexPriceSelect = [];
95101

96102
foreach ($this->dimensionCollectionFactory->create() as $dimensions) {
97-
$catalogProductIndexPriceSelect[] = $connection->select()->from(
98-
$this->tableResolver->resolve('catalog_product_index_price', $dimensions),
99-
['entity_id', 'customer_group_id', 'website_id', 'min_price']
100-
);
101-
if ($productIds) {
102-
current($catalogProductIndexPriceSelect)->where('entity_id IN (?)', $productIds);
103+
if (!isset($dimensions[WebsiteDimensionProvider::DIMENSION_NAME]) ||
104+
$this->websiteId === null ||
105+
$dimensions[WebsiteDimensionProvider::DIMENSION_NAME]->getValue() === $this->websiteId) {
106+
$select = $connection->select()->from(
107+
$this->tableResolver->resolve('catalog_product_index_price', $dimensions),
108+
['entity_id', 'customer_group_id', 'website_id', 'min_price']
109+
);
110+
if ($productIds) {
111+
$select->where('entity_id IN (?)', $productIds);
112+
}
113+
$catalogProductIndexPriceSelect[] = $select;
103114
}
104115
}
105116

@@ -123,9 +134,12 @@ protected function _getCatalogProductPriceData($productIds = null)
123134
*/
124135
public function getPriceIndexData($productIds, $storeId)
125136
{
137+
$websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();
138+
139+
$this->websiteId = $websiteId;
126140
$priceProductsIndexData = $this->_getCatalogProductPriceData($productIds);
141+
$this->websiteId = null;
127142

128-
$websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();
129143
if (!isset($priceProductsIndexData[$websiteId])) {
130144
return [];
131145
}

app/code/Magento/Authorizenet/Controller/Directpost/Payment/BackendResponse.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
use Magento\Authorizenet\Model\Directpost;
1111
use Magento\Authorizenet\Model\DirectpostFactory;
1212
use Magento\Framework\App\Action\Context;
13+
use Magento\Framework\App\CsrfAwareActionInterface;
14+
use Magento\Framework\App\Request\InvalidRequestException;
15+
use Magento\Framework\App\RequestInterface;
1316
use Magento\Framework\Controller\ResultFactory;
1417
use Magento\Framework\Exception\LocalizedException;
1518
use Magento\Framework\Registry;
1619
use Psr\Log\LoggerInterface;
1720

18-
class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Payment
21+
class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Payment implements CsrfAwareActionInterface
1922
{
2023
/**
2124
* @var LoggerInterface
@@ -48,6 +51,23 @@ public function __construct(
4851
$this->logger = $logger ?: $this->_objectManager->get(LoggerInterface::class);
4952
}
5053

54+
/**
55+
* @inheritDoc
56+
*/
57+
public function createCsrfValidationException(
58+
RequestInterface $request
59+
): ?InvalidRequestException {
60+
return null;
61+
}
62+
63+
/**
64+
* @inheritDoc
65+
*/
66+
public function validateForCsrf(RequestInterface $request): ?bool
67+
{
68+
return true;
69+
}
70+
5171
/**
5272
* Response action.
5373
* Action for Authorize.net SIM Relay Request.

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Response.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,29 @@
66
*/
77
namespace Magento\Authorizenet\Controller\Directpost\Payment;
88

9-
class Response extends \Magento\Authorizenet\Controller\Directpost\Payment
9+
use Magento\Framework\App\CsrfAwareActionInterface;
10+
use Magento\Framework\App\Request\InvalidRequestException;
11+
use Magento\Framework\App\RequestInterface;
12+
13+
class Response extends \Magento\Authorizenet\Controller\Directpost\Payment implements CsrfAwareActionInterface
1014
{
15+
/**
16+
* @inheritDoc
17+
*/
18+
public function createCsrfValidationException(
19+
RequestInterface $request
20+
): ?InvalidRequestException {
21+
return null;
22+
}
23+
24+
/**
25+
* @inheritDoc
26+
*/
27+
public function validateForCsrf(RequestInterface $request): ?bool
28+
{
29+
return true;
30+
}
31+
1132
/**
1233
* Response action.
1334
* Action for Authorize.net SIM Relay Request.

app/code/Magento/Authorizenet/Model/Directpost/Request.php

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -112,50 +112,50 @@ public function setDataFromOrder(
112112
sprintf('%.2F', $order->getBaseShippingAmount())
113113
);
114114

115-
//need to use strval() because NULL values IE6-8 decodes as "null" in JSON in JavaScript,
115+
//need to use (string) because NULL values IE6-8 decodes as "null" in JSON in JavaScript,
116116
//but we need "" for null values.
117117
$billing = $order->getBillingAddress();
118118
if (!empty($billing)) {
119-
$this->setXFirstName(strval($billing->getFirstname()))
120-
->setXLastName(strval($billing->getLastname()))
121-
->setXCompany(strval($billing->getCompany()))
122-
->setXAddress(strval($billing->getStreetLine(1)))
123-
->setXCity(strval($billing->getCity()))
124-
->setXState(strval($billing->getRegion()))
125-
->setXZip(strval($billing->getPostcode()))
126-
->setXCountry(strval($billing->getCountryId()))
127-
->setXPhone(strval($billing->getTelephone()))
128-
->setXFax(strval($billing->getFax()))
129-
->setXCustId(strval($billing->getCustomerId()))
130-
->setXCustomerIp(strval($order->getRemoteIp()))
131-
->setXCustomerTaxId(strval($billing->getTaxId()))
132-
->setXEmail(strval($order->getCustomerEmail()))
133-
->setXEmailCustomer(strval($paymentMethod->getConfigData('email_customer')))
134-
->setXMerchantEmail(strval($paymentMethod->getConfigData('merchant_email')));
119+
$this->setXFirstName((string)$billing->getFirstname())
120+
->setXLastName((string)$billing->getLastname())
121+
->setXCompany((string)$billing->getCompany())
122+
->setXAddress((string)$billing->getStreetLine(1))
123+
->setXCity((string)$billing->getCity())
124+
->setXState((string)$billing->getRegion())
125+
->setXZip((string)$billing->getPostcode())
126+
->setXCountry((string)$billing->getCountryId())
127+
->setXPhone((string)$billing->getTelephone())
128+
->setXFax((string)$billing->getFax())
129+
->setXCustId((string)$billing->getCustomerId())
130+
->setXCustomerIp((string)$order->getRemoteIp())
131+
->setXCustomerTaxId((string)$billing->getTaxId())
132+
->setXEmail((string)$order->getCustomerEmail())
133+
->setXEmailCustomer((string)$paymentMethod->getConfigData('email_customer'))
134+
->setXMerchantEmail((string)$paymentMethod->getConfigData('merchant_email'));
135135
}
136136

137137
$shipping = $order->getShippingAddress();
138138
if (!empty($shipping)) {
139139
$this->setXShipToFirstName(
140-
strval($shipping->getFirstname())
140+
(string)$shipping->getFirstname()
141141
)->setXShipToLastName(
142-
strval($shipping->getLastname())
142+
(string)$shipping->getLastname()
143143
)->setXShipToCompany(
144-
strval($shipping->getCompany())
144+
(string)$shipping->getCompany()
145145
)->setXShipToAddress(
146-
strval($shipping->getStreetLine(1))
146+
(string)$shipping->getStreetLine(1)
147147
)->setXShipToCity(
148-
strval($shipping->getCity())
148+
(string)$shipping->getCity()
149149
)->setXShipToState(
150-
strval($shipping->getRegion())
150+
(string)$shipping->getRegion()
151151
)->setXShipToZip(
152-
strval($shipping->getPostcode())
152+
(string)$shipping->getPostcode()
153153
)->setXShipToCountry(
154-
strval($shipping->getCountryId())
154+
(string)$shipping->getCountryId()
155155
);
156156
}
157157

158-
$this->setXPoNum(strval($payment->getPoNumber()));
158+
$this->setXPoNum((string)$payment->getPoNumber());
159159

160160
return $this;
161161
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<resource id="Magento_Backend::admin">
1212
<resource id="Magento_Reports::report">
1313
<resource id="Magento_Reports::salesroot">
14-
<resource id="Magento_Braintree::settlement_report" title="Braintree Settlement" sortOrder="80" />
14+
<resource id="Magento_Braintree::settlement_report" title="Braintree Settlement" translate="title" sortOrder="80" />
1515
</resource>
1616
</resource>
1717
<resource id="Magento_Sales::sales">

app/code/Magento/Braintree/etc/adminhtml/menu.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<add
1111
id="Magento_Braintree::settlement_report"
1212
title="Braintree Settlement"
13+
translate="title"
1314
module="Magento_Braintree"
1415
sortOrder="80"
1516
parent="Magento_Reports::report_salesroot"

app/code/Magento/Braintree/i18n/en_US.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,5 @@ Currency,Currency
190190
"Partial settlements are not supported by this processor.","Partial settlements are not supported by this processor."
191191
"Transaction can not be voided if status of a PayPal partial settlement child transaction is settlement_pending.","Transaction can not be voided if status of a PayPal partial settlement child transaction is settlement_pending."
192192
"Too many concurrent attempts to refund this transaction. Try again later.","Too many concurrent attempts to refund this transaction. Try again later."
193-
"Too many concurrent attempts to void this transaction. Try again later.","Too many concurrent attempts to void this transaction. Try again later."
193+
"Too many concurrent attempts to void this transaction. Try again later.","Too many concurrent attempts to void this transaction. Try again later."
194+
"Braintree Settlement","Braintree Settlement"

0 commit comments

Comments
 (0)