Skip to content

Commit bf517d2

Browse files
committed
Merge branch '2.2-develop' of github.com:magento/magento2ce into MQE-401
2 parents 388f0fb + e6e275b commit bf517d2

File tree

28 files changed

+298
-48
lines changed

28 files changed

+298
-48
lines changed

app/code/Magento/Analytics/etc/di.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,22 @@
254254
<argument name="responseResolver" xsi:type="object">NotifyDataChangedResponseResolver</argument>
255255
</arguments>
256256
</type>
257+
<type name="Magento\Config\Model\Config\TypePool">
258+
<arguments>
259+
<argument name="sensitive" xsi:type="array">
260+
<item name="analytics/url/signup" xsi:type="string">1</item>
261+
<item name="analytics/url/update" xsi:type="string">1</item>
262+
<item name="analytics/url/bi_essentials" xsi:type="string">1</item>
263+
<item name="analytics/url/otp" xsi:type="string">1</item>
264+
<item name="analytics/url/report" xsi:type="string">1</item>
265+
<item name="analytics/url/notify_data_changed" xsi:type="string">1</item>
266+
<item name="analytics/general/token" xsi:type="string">1</item>
267+
</argument>
268+
<argument name="environment" xsi:type="array">
269+
<item name="crontab/default/jobs/analytics_collect_data/schedule/cron_expr" xsi:type="string">1</item>
270+
<item name="crontab/default/jobs/analytics_update/schedule/cron_expr" xsi:type="string">1</item>
271+
<item name="crontab/default/jobs/analytics_subscribe/schedule/cron_expr" xsi:type="string">1</item>
272+
</argument>
273+
</arguments>
274+
</type>
257275
</config>

app/code/Magento/Catalog/Block/Product/View/Attributes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ public function getAdditionalData(array $excludeAttr = [])
8181
$attributes = $product->getAttributes();
8282
foreach ($attributes as $attribute) {
8383
if ($attribute->getIsVisibleOnFront() && !in_array($attribute->getAttributeCode(), $excludeAttr)) {
84-
$value = $attribute->getFrontend()->getValue($product);
85-
84+
if (is_array($value = $attribute->getFrontend()->getValue($product))) {
85+
continue;
86+
}
8687
if (!$product->hasData($attribute->getAttributeCode())) {
8788
$value = __('N/A');
8889
} elseif ((string)$value == '') {
8990
$value = __('No');
9091
} elseif ($attribute->getFrontendInput() == 'price' && is_string($value)) {
9192
$value = $this->priceCurrency->convertAndFormat($value);
9293
}
93-
9494
if ($value instanceof Phrase || (is_string($value) && strlen($value))) {
9595
$data[$attribute->getAttributeCode()] = [
9696
'label' => __($attribute->getStoreLabel()),

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ $stores = $block->getStoresSortedBySortOrder();
8888
$values = [];
8989
foreach($block->getOptionValues() as $value) {
9090
$value = $value->getData();
91-
$values[] = is_array($value) ? array_map("htmlspecialchars_decode", $value) : $value;
91+
$values[] = is_array($value) ? array_map(function($str) {
92+
return htmlspecialchars_decode($str, ENT_QUOTES);
93+
}, $value) : $value;
9294
}
9395
?>
9496
<script type="text/x-magento-init">

app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ $class = ($_option->getIsRequire()) ? ' required' : '';
2929
if ($_option->getMaxCharacters()) {
3030
$_textValidate['maxlength'] = $_option->getMaxCharacters();
3131
}
32+
$_textValidate['validate-no-utf8mb4-characters'] = true;
3233
?>
3334
<input type="text"
3435
id="options_<?= /* @escapeNotVerified */ $_option->getId() ?>_text"
@@ -47,6 +48,7 @@ $class = ($_option->getIsRequire()) ? ' required' : '';
4748
if ($_option->getMaxCharacters()) {
4849
$_textAreaValidate['maxlength'] = $_option->getMaxCharacters();
4950
}
51+
$_textAreaValidate['validate-no-utf8mb4-characters'] = true;
5052
?>
5153
<textarea id="options_<?= /* @escapeNotVerified */ $_option->getId() ?>_text"
5254
class="product-custom-option"

app/code/Magento/Directory/etc/zip_codes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
</zip>
227227
<zip countryCode="KR">
228228
<codes>
229-
<code id="pattern_1" active="true" example="123-456">^[0-9]{3}-[0-9]{3}$</code>
229+
<code id="pattern_1" active="true" example="12345">^[0-9]{5}$</code>
230230
</codes>
231231
</zip>
232232
<zip countryCode="KG">

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
payment and shipping information to skip tedious checkout steps.</p>
1616
</div>
1717
<div class=""email-marketing-highlight"">
18-
<h3>Email Marketing Automation</span></h3>
18+
<h3>Email Marketing Automation</h3>
1919
<p>Send smarter, faster email campaigns with marketing automation from dotmailer, powered by
2020
your Magento store's live data.</p>
2121
</div>
@@ -34,7 +34,7 @@
3434
payment and shipping information to skip tedious checkout steps.</p>
3535
</div>
3636
<div class=""email-marketing-highlight"">
37-
<h3>Email Marketing Automation</span></h3>
37+
<h3>Email Marketing Automation</h3>
3838
<p>Send smarter, faster email campaigns with marketing automation from dotmailer, powered by
3939
your Magento store's live data.</p>
4040
</div>
@@ -65,26 +65,26 @@
6565
features include:
6666
</p>
6767
<ul>
68-
<li><span>Configurable “Instant Purchase” button to place orders</span></li>
68+
<li><span>Configurable “Instant Purchase” button to place orders.</span></li>
6969
<li><span>Support for all payment solutions using Braintree Vault, including Braintree Credit
7070
Card, Braintree PayPal, and PayPal Payflow Pro.</span></li>
7171
<li><span>Shipping to the customer’s default address using the lowest cost, available shipping
72-
method</span></li>
72+
method.</span></li>
7373
<li><span>Ability for developers to customize the Instant Purchase business logic to meet
74-
merchant needs</span></li>
74+
merchant needs.</span></li>
7575
</ul>","<p>Now you can deliver an Amazon-like experience with a new, streamlined checkout option.
7676
Logged-in customers can use previously-stored payment credentials and shipping information
7777
to skip steps, making the process faster and easier, especially for mobile shoppers. Key
7878
features include:
7979
</p>
8080
<ul>
81-
<li><span>Configurable “Instant Purchase” button to place orders</span></li>
81+
<li><span>Configurable “Instant Purchase” button to place orders.</span></li>
8282
<li><span>Support for all payment solutions using Braintree Vault, including Braintree Credit
8383
Card, Braintree PayPal, and PayPal Payflow Pro.</span></li>
8484
<li><span>Shipping to the customer’s default address using the lowest cost, available shipping
85-
method</span></li>
85+
method.</span></li>
8686
<li><span>Ability for developers to customize the Instant Purchase business logic to meet
87-
merchant needs</span></li>
87+
merchant needs.</span></li>
8888
</ul>"
8989
"Email Marketing Automation","Email Marketing Automation"
9090
"<p>Unlock an unparalleled level of insight and control of your eCommerce marketing with

app/code/Magento/ReleaseNotification/view/adminhtml/ui_component/release_notification.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
payment and shipping information to skip tedious checkout steps.</p>
7474
</div>
7575
<div class="email-marketing-highlight">
76-
<h3>Email Marketing Automation</span></h3>
76+
<h3>Email Marketing Automation</h3>
7777
<p>Send smarter, faster email campaigns with marketing automation from dotmailer, powered by
7878
your Magento store's live data.</p>
7979
</div>
@@ -226,13 +226,13 @@
226226
features include:
227227
</p>
228228
<ul>
229-
<li><span>Configurable “Instant Purchase” button to place orders</span></li>
229+
<li><span>Configurable “Instant Purchase” button to place orders.</span></li>
230230
<li><span>Support for all payment solutions using Braintree Vault, including Braintree Credit
231231
Card, Braintree PayPal, and PayPal Payflow Pro.</span></li>
232232
<li><span>Shipping to the customer’s default address using the lowest cost, available shipping
233-
method</span></li>
233+
method.</span></li>
234234
<li><span>Ability for developers to customize the Instant Purchase business logic to meet
235-
merchant needs</span></li>
235+
merchant needs.</span></li>
236236
</ul>]]>
237237
</item>
238238
</item>

app/code/Magento/Sales/Model/Order/Creditmemo/Sender/EmailSender.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77

88
use Magento\Sales\Model\Order\Email\Sender;
99
use Magento\Sales\Model\Order\Creditmemo\SenderInterface;
10+
use Magento\Framework\DataObject;
1011

1112
/**
1213
* Email notification sender for Creditmemo.
14+
*
15+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1316
*/
1417
class EmailSender extends Sender implements SenderInterface
1518
{
@@ -106,13 +109,17 @@ public function send(
106109
'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
107110
'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
108111
];
112+
$transportObject = new DataObject($transport);
109113

114+
/**
115+
* Event argument `transport` is @deprecated. Use `transportObject` instead.
116+
*/
110117
$this->eventManager->dispatch(
111118
'email_creditmemo_set_template_vars_before',
112-
['sender' => $this, 'transport' => $transport]
119+
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
113120
);
114121

115-
$this->templateContainer->setTemplateVars($transport);
122+
$this->templateContainer->setTemplateVars($transportObject->getData());
116123

117124
if ($this->checkAndSend($order)) {
118125
$creditmemo->setEmailSent(true);

app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoCommentSender.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Sales\Model\Order\Email\NotifySender;
1313
use Magento\Sales\Model\Order\Address\Renderer;
1414
use Magento\Framework\Event\ManagerInterface;
15+
use Magento\Framework\DataObject;
1516

1617
/**
1718
* Class CreditmemoCommentSender
@@ -71,13 +72,17 @@ public function send(Creditmemo $creditmemo, $notify = true, $comment = '')
7172
'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
7273
'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
7374
];
75+
$transportObject = new DataObject($transport);
7476

77+
/**
78+
* Event argument `transport` is @deprecated. Use `transportObject` instead.
79+
*/
7580
$this->eventManager->dispatch(
7681
'email_creditmemo_comment_set_template_vars_before',
77-
['sender' => $this, 'transport' => $transport]
82+
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
7883
);
7984

80-
$this->templateContainer->setTemplateVars($transport);
85+
$this->templateContainer->setTemplateVars($transportObject->getData());
8186

8287
return $this->checkAndSend($order, $notify);
8388
}

app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Magento\Sales\Model\ResourceModel\Order\Creditmemo as CreditmemoResource;
1515
use Magento\Sales\Model\Order\Address\Renderer;
1616
use Magento\Framework\Event\ManagerInterface;
17+
use Magento\Framework\DataObject;
1718

1819
/**
1920
* Class CreditmemoSender
@@ -102,7 +103,7 @@ public function send(Creditmemo $creditmemo, $forceSyncMode = false)
102103

103104
if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
104105
$order = $creditmemo->getOrder();
105-
106+
106107
$transport = [
107108
'order' => $order,
108109
'creditmemo' => $creditmemo,
@@ -113,13 +114,17 @@ public function send(Creditmemo $creditmemo, $forceSyncMode = false)
113114
'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
114115
'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
115116
];
117+
$transportObject = new DataObject($transport);
116118

119+
/**
120+
* Event argument `transport` is @deprecated. Use `transportObject` instead.
121+
*/
117122
$this->eventManager->dispatch(
118123
'email_creditmemo_set_template_vars_before',
119-
['sender' => $this, 'transport' => $transport]
124+
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
120125
);
121126

122-
$this->templateContainer->setTemplateVars($transport);
127+
$this->templateContainer->setTemplateVars($transportObject->getData());
123128

124129
if ($this->checkAndSend($order)) {
125130
$creditmemo->setEmailSent(true);

app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceCommentSender.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Sales\Model\Order\Invoice;
1313
use Magento\Sales\Model\Order\Address\Renderer;
1414
use Magento\Framework\Event\ManagerInterface;
15+
use Magento\Framework\DataObject;
1516

1617
/**
1718
* Class InvoiceCommentSender
@@ -71,13 +72,17 @@ public function send(Invoice $invoice, $notify = true, $comment = '')
7172
'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
7273
'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
7374
];
75+
$transportObject = new DataObject($transport);
7476

77+
/**
78+
* Event argument `transport` is @deprecated. Use `transportObject` instead.
79+
*/
7580
$this->eventManager->dispatch(
7681
'email_invoice_comment_set_template_vars_before',
77-
['sender' => $this, 'transport' => $transport]
82+
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
7883
);
7984

80-
$this->templateContainer->setTemplateVars($transport);
85+
$this->templateContainer->setTemplateVars($transportObject->getData());
8186

8287
return $this->checkAndSend($order, $notify);
8388
}

app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceSender.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Magento\Sales\Model\ResourceModel\Order\Invoice as InvoiceResource;
1515
use Magento\Sales\Model\Order\Address\Renderer;
1616
use Magento\Framework\Event\ManagerInterface;
17+
use Magento\Framework\DataObject;
1718

1819
/**
1920
* Class InvoiceSender
@@ -113,13 +114,17 @@ public function send(Invoice $invoice, $forceSyncMode = false)
113114
'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
114115
'formattedBillingAddress' => $this->getFormattedBillingAddress($order)
115116
];
117+
$transportObject = new DataObject($transport);
116118

119+
/**
120+
* Event argument `transport` is @deprecated. Use `transportObject` instead.
121+
*/
117122
$this->eventManager->dispatch(
118123
'email_invoice_set_template_vars_before',
119-
['sender' => $this, 'transport' => $transport]
124+
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
120125
);
121126

122-
$this->templateContainer->setTemplateVars($transport);
127+
$this->templateContainer->setTemplateVars($transportObject->getData());
123128

124129
if ($this->checkAndSend($order)) {
125130
$invoice->setEmailSent(true);

app/code/Magento/Sales/Model/Order/Email/Sender/OrderCommentSender.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Sales\Model\Order\Email\NotifySender;
1212
use Magento\Sales\Model\Order\Address\Renderer;
1313
use Magento\Framework\Event\ManagerInterface;
14+
use Magento\Framework\DataObject;
1415

1516
/**
1617
* Class OrderCommentSender
@@ -68,13 +69,17 @@ public function send(Order $order, $notify = true, $comment = '')
6869
'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
6970
'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
7071
];
72+
$transportObject = new DataObject($transport);
7173

74+
/**
75+
* Event argument `transport` is @deprecated. Use `transportObject` instead.
76+
*/
7277
$this->eventManager->dispatch(
7378
'email_order_comment_set_template_vars_before',
74-
['sender' => $this, 'transport' => $transport]
79+
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
7580
);
7681

77-
$this->templateContainer->setTemplateVars($transport);
82+
$this->templateContainer->setTemplateVars($transportObject->getData());
7883

7984
return $this->checkAndSend($order, $notify);
8085
}

app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentCommentSender.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Sales\Model\Order\Shipment;
1313
use Magento\Sales\Model\Order\Address\Renderer;
1414
use Magento\Framework\Event\ManagerInterface;
15+
use Magento\Framework\DataObject;
1516

1617
/**
1718
* Class ShipmentCommentSender
@@ -71,13 +72,17 @@ public function send(Shipment $shipment, $notify = true, $comment = '')
7172
'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
7273
'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
7374
];
75+
$transportObject = new DataObject($transport);
7476

77+
/**
78+
* Event argument `transport` is @deprecated. Use `transportObject` instead.
79+
*/
7580
$this->eventManager->dispatch(
7681
'email_shipment_comment_set_template_vars_before',
77-
['sender' => $this, 'transport' => $transport]
82+
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
7883
);
7984

80-
$this->templateContainer->setTemplateVars($transport);
85+
$this->templateContainer->setTemplateVars($transportObject->getData());
8186

8287
return $this->checkAndSend($order, $notify);
8388
}

0 commit comments

Comments
 (0)