Skip to content

Commit c7f6511

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'mainlinec/develop' into MAGETWO-51479
Conflicts: app/code/Magento/Ui/Component/Form/Element/AbstractOptionsField.php
2 parents 4b62e75 + 951694c commit c7f6511

File tree

725 files changed

+11862
-11146
lines changed

Some content is hidden

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

725 files changed

+11862
-11146
lines changed

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,14 +985,14 @@ private function invokeMethod($object, $method, $args = [])
985985
private function getAdvancedPricingMock($methods = [])
986986
{
987987
$metadataPoolMock = $this->getMock(
988-
\Magento\Framework\Model\Entity\MetadataPool::class,
988+
\Magento\Framework\EntityManager\MetadataPool::class,
989989
[],
990990
[],
991991
'',
992992
false
993993
);
994994
$metadataMock = $this->getMock(
995-
\Magento\Framework\Model\Entity\EntityMetadata::class,
995+
\Magento\Framework\EntityManager\EntityMetadata::class,
996996
[],
997997
[],
998998
'',

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

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,12 @@
88

99
use Magento\Framework\App\ObjectManager;
1010
use Magento\Payment\Block\Transparent\Iframe;
11-
use Magento\Framework\Escaper;
1211

1312
/**
1413
* Class Redirect
1514
*/
1615
class Redirect extends \Magento\Authorizenet\Controller\Directpost\Payment
1716
{
18-
/**
19-
* @var Escaper
20-
*/
21-
private $escaper;
22-
2317
/**
2418
* Retrieve params and put javascript into iframe
2519
*
@@ -29,7 +23,7 @@ public function execute()
2923
{
3024
$helper = $this->dataFactory->create('frontend');
3125

32-
$redirectParams = $this->filterData($this->getRequest()->getParams());
26+
$redirectParams = $this->getRequest()->getParams();
3327
$params = [];
3428
if (!empty($redirectParams['success'])
3529
&& isset($redirectParams['x_invoice_num'])
@@ -38,9 +32,11 @@ public function execute()
3832
$this->_getDirectPostSession()->unsetData('quote_id');
3933
$params['redirect_parent'] = $helper->getSuccessOrderUrl([]);
4034
}
35+
4136
if (!empty($redirectParams['error_msg'])) {
4237
$cancelOrder = empty($redirectParams['x_invoice_num']);
4338
$this->_returnCustomerQuote($cancelOrder, $redirectParams['error_msg']);
39+
$params['error_msg'] = $redirectParams['error_msg'];
4440
}
4541

4642
if (isset($redirectParams['controller_action_name'])
@@ -50,34 +46,8 @@ public function execute()
5046
unset($params['redirect_parent']);
5147
}
5248

53-
$this->_coreRegistry->register(Iframe::REGISTRY_KEY, array_merge($params, $redirectParams));
49+
$this->_coreRegistry->register(Iframe::REGISTRY_KEY, $params);
5450
$this->_view->addPageLayoutHandles();
5551
$this->_view->loadLayout(false)->renderLayout();
5652
}
57-
58-
/**
59-
* Escape xss in request data
60-
* @param array $data
61-
* @return array
62-
*/
63-
private function filterData(array $data)
64-
{
65-
$self = $this;
66-
array_walk($data, function (&$item) use ($self) {
67-
$item = $self->getEscaper()->escapeXssInUrl($item);
68-
});
69-
return $data;
70-
}
71-
72-
/**
73-
* Get Escaper instance
74-
* @return Escaper
75-
*/
76-
private function getEscaper()
77-
{
78-
if (!$this->escaper) {
79-
$this->escaper = ObjectManager::getInstance()->get(Escaper::class);
80-
}
81-
return $this->escaper;
82-
}
8353
}

app/code/Magento/Authorizenet/Test/Unit/Controller/Directpost/Payment/RedirectTest.php

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Magento\Authorizenet\Controller\Directpost\Payment\Redirect;
99
use Magento\Framework\App\RequestInterface;
1010
use Magento\Framework\App\ViewInterface;
11-
use Magento\Framework\Escaper;
1211
use Magento\Framework\Registry;
1312
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1413
use Magento\Payment\Block\Transparent\Iframe;
@@ -34,11 +33,6 @@ class RedirectTest extends \PHPUnit_Framework_TestCase
3433
*/
3534
private $coreRegistry;
3635

37-
/**
38-
* @var Escaper|MockObject
39-
*/
40-
private $escaper;
41-
4236
/**
4337
* @var Redirect
4438
*/
@@ -57,21 +51,11 @@ protected function setUp()
5751
->setMethods(['register'])
5852
->getMock();
5953

60-
$this->escaper = static::getMockBuilder(Escaper::class)
61-
->disableOriginalConstructor()
62-
->setMethods(['escapeXssInUrl'])
63-
->getMock();
64-
6554
$this->controller = $objectManager->getObject(Redirect::class, [
6655
'request' => $this->request,
6756
'view' => $this->view,
6857
'coreRegistry' => $this->coreRegistry
6958
]);
70-
71-
$refClass = new \ReflectionClass(Redirect::class);
72-
$refProperty = $refClass->getProperty('escaper');
73-
$refProperty->setAccessible(true);
74-
$refProperty->setValue($this->controller, $this->escaper);
7559
}
7660

7761
/**
@@ -87,14 +71,9 @@ public function testExecute()
8771
->method('getParams')
8872
->willReturn($params);
8973

90-
$this->escaper->expects(static::once())
91-
->method('escapeXssInUrl')
92-
->with($url)
93-
->willReturn($url);
94-
9574
$this->coreRegistry->expects(static::once())
9675
->method('register')
97-
->with(Iframe::REGISTRY_KEY, $params);
76+
->with(Iframe::REGISTRY_KEY, []);
9877

9978
$this->view->expects(static::once())
10079
->method('addPageLayoutHandles');

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

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

85-
$htmlAttibutes = ['value' => $this->escapeHtml($this->_jsonEncoder->encode($action))];
86-
$actionAttributes->setData($htmlAttibutes);
85+
$htmlAttributes = ['value' => $this->escapeHtml($this->_jsonEncoder->encode($action))];
86+
$actionAttributes->setData($htmlAttributes);
8787
return '<option ' . $actionAttributes->serialize() . '>' . $actionCaption . '</option>';
8888
}
8989

app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<?php else: ?>
2626
<?php echo $block->getHintHtml() ?>
2727
<?php endif; ?>
28-
<div class="tree-store-scope">
28+
<div class="admin__fieldset tree-store-scope">
2929
<?php if ($_element->getComment()): ?>
3030
<p class="comment"><?php echo $block->escapeHtml($_element->getComment()) ?></p>
3131
<?php endif; ?>

app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/cells/action-delete.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
-->
77
<button class="action-delete"
88
data-bind="
9-
click: function(){ $parents[1].deleteRecord($parent.index, $parent.recordId); },
9+
click: function(){ $parent.processingDeleteRecord($record().index, $record().recordId); },
1010
attr: {
11-
title: $parents[1].deleteButtonLabel
11+
title: $parent.deleteButtonLabel
1212
}
1313
">
14-
<span data-bind="text: $parents[1].deleteButtonLabel"></span>
14+
<span data-bind="text: $parent.deleteButtonLabel"></span>
1515
</button>

app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,36 +34,44 @@
3434
</label>
3535

3636
<div class="admin__field-control" data-role="grid-wrapper">
37+
<div class="admin__control-table-pagination" visible="!!$data.recordData().length">
38+
<div class="admin__data-grid-pager">
39+
<button class="action-previous" type="button" data-bind="attr: {title: $t('Previous Page')}, click: previousPage, disable: isFirst()"></button>
40+
<input class="admin__control-text" type="number" data-bind="attr: {id: ++ko.uid}, value: currentPage">
41+
<label class="admin__control-support-text" data-bind="attr: {for: ko.uid}, text: 'of ' + pages()"></label>
42+
<button class="action-next" type="button" data-bind="attr: {title: $t('Next Page')}, click: nextPage, disable: isLast()"></button>
43+
</div>
44+
</div>
3745
<div class="admin__control-table-wrapper">
3846
<table class="admin__dynamic-rows data-grid" data-role="grid">
3947
<thead if="element.columnsHeader">
4048
<tr>
4149
<th if="dndConfig.enabled"
4250
class="data-grid-draggable-row-cell"/>
4351

44-
<!-- ko foreach: {data: labels, as: 'item'} -->
45-
<th class="data-grid-th"
46-
text="item.label"
47-
visible="item.visible"
48-
disabled="item.disabled"
49-
css="$parent.setClasses(item)">
52+
<th repeat="foreach: labels, item: '$label'"
53+
class="data-grid-th"
54+
text="$label().label"
55+
visible="$label().visible"
56+
disable="$label().disabled"
57+
css="setClasses($label())">
5058
</th>
51-
<!-- /ko -->
5259
</tr>
5360
</thead>
5461

5562
<tbody data-bind="foreach: elems">
56-
<tr class="data-row"
57-
css="'_odd-row': $index() % 2">
58-
<td if="$parent.dndConfig.enabled"
63+
<tr repeat="foreach: elems, item: '$record'"
64+
class="data-row"
65+
css="'_odd-row': $index % 2">
66+
<td if="dndConfig.enabled"
5967
class="data-grid-draggable-row-cell"
60-
template="name: $parent.dndConfig.template, data: $parent.dnd"/>
68+
template="name: dndConfig.template, data: dnd"/>
6169

62-
<!-- ko foreach: { data: elems, as: 'elem'} -->
70+
<!-- ko fastForEach: { data: $record().elems, as: 'elem'} -->
6371
<td if="elem.template"
6472
visible="elem.visible"
65-
disabled="elem.disabled"
66-
css="$parents[1].setClasses(elem)"
73+
disable="elem.disabled"
74+
css="$parent.setClasses(elem)"
6775
template="elem.template"
6876
attr="'data-index': index"/>
6977
<!-- /ko -->

app/code/Magento/Braintree/Controller/Payment/GetNonce.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
use Magento\Framework\Controller\ResultInterface;
1313
use Magento\Framework\Session\SessionManagerInterface;
1414
use Magento\Framework\Webapi\Exception;
15-
use Psr\Log\LoggerInterface;
16-
use Magento\Vault\Model\Ui\TokenUiComponentProviderInterface;
17-
use Magento\CheckoutAgreements;
1815
use Magento\Theme;
16+
use Psr\Log\LoggerInterface;
1917

2018
/**
2119
* Class GetNonce

app/code/Magento/Braintree/composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
"magento/module-catalog": "*",
1717
"magento/module-quote": "*",
1818
"magento/module-paypal": "*",
19-
"magento/module-checkout-agreements": "*",
2019
"magento/module-theme": "*",
2120
"braintree/braintree_php": "3.7.0"
2221
},
22+
"suggest": {
23+
"magento/module-checkout-agreements": "100.0.*"
24+
},
2325
"type": "magento2-module",
2426
"version": "100.0.2",
2527
"license": [

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<module name="Magento_Catalog"/>
1616
<module name="Magento_Quote"/>
1717
<module name="Magento_Paypal"/>
18-
<module name="Magento_CheckoutAgreements"/>
1918
<module name="Magento_Theme"/>
2019
</sequence>
2120
</module>

0 commit comments

Comments
 (0)