Skip to content

Commit a28aa5a

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'mainline/develop' into falcons-develop
2 parents 533393b + 8add899 commit a28aa5a

File tree

369 files changed

+10993
-1739
lines changed

Some content is hidden

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

369 files changed

+10993
-1739
lines changed

app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,8 @@ protected function _getWebsiteCode($websiteId)
395395
{
396396
$storeName = ($websiteId == 0)
397397
? ImportAdvancedPricing::VALUE_ALL_WEBSITES
398-
: $this->_storeManager->getWebsite($websiteId)->getName();
398+
: $this->_storeManager->getWebsite($websiteId)->getCode();
399+
$currencyCode = '';
399400
if ($websiteId == 0) {
400401
$currencyCode = $this->_storeManager->getWebsite($websiteId)->getBaseCurrencyCode();
401402
}

app/code/Magento/Authorizenet/Model/Source/Cctype.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ class Cctype extends PaymentCctype
1717
*/
1818
public function getAllowedTypes()
1919
{
20-
return ['VI', 'MC', 'AE', 'DI', 'OT'];
20+
return ['VI', 'MC', 'AE', 'DI'];
2121
}
2222
}

app/code/Magento/Backend/Block/Widget/Button.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function _attributesToHtml($attributes)
113113
if ($attributeValue === null || $attributeValue == '') {
114114
continue;
115115
}
116-
$html .= $attributeKey . '="' . $this->escapeHtml($attributeValue) . '" ';
116+
$html .= $attributeKey . '="' . $this->escapeHtmlAttr($attributeValue, false) . '" ';
117117
}
118118

119119
return $html;

app/code/Magento/Backend/Block/Widget/Button/SplitButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ protected function _getAttributesString($attributes)
229229
if ($attributeValue === null || $attributeValue == '') {
230230
continue;
231231
}
232-
$html[] = $attributeKey . '="' . $this->escapeHtml($attributeValue) . '"';
232+
$html[] = $attributeKey . '="' . $this->escapeHtmlAttr($attributeValue, false) . '"';
233233
}
234234
return join(' ', $html);
235235
}

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ protected function _toOptionHtml($action, \Magento\Framework\DataObject $row)
8282
$actionCaption = '';
8383
$this->_transformActionData($action, $actionCaption, $row);
8484

85-
$htmlAttributes = ['value' => $this->escapeHtml($this->_jsonEncoder->encode($action))];
85+
$htmlAttributes = [
86+
'value' => $this->escapeHtmlAttr($this->_jsonEncoder->encode($action), false)
87+
];
8688
$actionAttributes->setData($htmlAttributes);
8789
return '<option ' . $actionAttributes->serialize() . '>' . $actionCaption . '</option>';
8890
}

app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function _construct()
5454
{
5555
parent::_construct();
5656

57-
$this->setErrorText($this->escapeJsQuote(__('Please select items.')));
57+
$this->setErrorText($this->escapeHtml(__('Please select items.')));
5858

5959
if (null !== $this->getOptions()) {
6060
foreach ($this->getOptions() as $optionId => $option) {

app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function __construct(
6666
public function _construct()
6767
{
6868
parent::_construct();
69-
$this->setErrorText($this->escapeJsQuote(__('Please select items.')));
69+
$this->setErrorText($this->escapeHtml(__('Please select items.')));
7070
}
7171

7272
/**

app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class="search-global-input"
1818
id="search-global"
1919
name="query"
20-
data-mage-init='<?php echo $block->escapeHtml($this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWidgetInitOptions()))?>'>
20+
data-mage-init='<?php /* @noEscape */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWidgetInitOptions()) ?>'>
2121
<button
2222
type="submit"
2323
class="search-global-action"

app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ require([
147147

148148
//<![CDATA[
149149
backup = new AdminBackup();
150-
backup.rollbackUrl = '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote($rollbackUrl);?>';
151-
backup.backupUrl = '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote($backupUrl);?>';
150+
backup.rollbackUrl = '<?php echo $block->escapeUrl($rollbackUrl); ?>';
151+
backup.backupUrl = '<?php echo $block->escapeUrl($backupUrl); ?>';
152152
//]]>
153153

154154
});
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Braintree\Block\Customer\PayPal;
7+
8+
use Magento\Braintree\Gateway\Config\PayPal\Config;
9+
use Magento\Braintree\Model\Ui\PayPal\ConfigProvider;
10+
use Magento\Framework\View\Element\Template;
11+
use Magento\Vault\Api\Data\PaymentTokenInterface;
12+
use Magento\Vault\Block\AbstractTokenRenderer;
13+
14+
/**
15+
* Class VaultTokenRenderer
16+
*/
17+
class VaultTokenRenderer extends AbstractTokenRenderer
18+
{
19+
/**
20+
* @var Config
21+
*/
22+
private $config;
23+
24+
public function __construct(
25+
Template\Context $context,
26+
Config $config,
27+
array $data = []
28+
) {
29+
parent::__construct($context, $data);
30+
$this->config = $config;
31+
}
32+
33+
/**
34+
* @inheritdoc
35+
*/
36+
public function getIconUrl()
37+
{
38+
return $this->config->getPayPalIcon()['url'];
39+
}
40+
41+
/**
42+
* @inheritdoc
43+
*/
44+
public function getIconHeight()
45+
{
46+
return $this->config->getPayPalIcon()['height'];
47+
}
48+
49+
/**
50+
* @inheritdoc
51+
*/
52+
public function getIconWidth()
53+
{
54+
return $this->config->getPayPalIcon()['width'];
55+
}
56+
57+
/**
58+
* Can render specified token
59+
*
60+
* @param PaymentTokenInterface $token
61+
* @return boolean
62+
*/
63+
public function canRender(PaymentTokenInterface $token)
64+
{
65+
return $token->getPaymentMethodCode() === ConfigProvider::PAYPAL_CODE;
66+
}
67+
68+
/**
69+
* Get email of PayPal payer
70+
* @return string
71+
*/
72+
public function getPayerEmail()
73+
{
74+
return $this->getTokenDetails()['payerEmail'];
75+
}
76+
}

0 commit comments

Comments
 (0)