Skip to content

Commit 53974f3

Browse files
Merge branch 'MAGETWO-95945' into 2.3-bugfixes-020119
2 parents 920cb14 + 30b3280 commit 53974f3

File tree

99 files changed

+534
-198
lines changed

Some content is hidden

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

99 files changed

+534
-198
lines changed

app/code/Magento/Backend/Model/Search/Customer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function load()
8989

9090
$this->searchCriteriaBuilder->setCurrentPage($this->getStart());
9191
$this->searchCriteriaBuilder->setPageSize($this->getLimit());
92-
$searchFields = ['firstname', 'lastname', 'company'];
92+
$searchFields = ['firstname', 'lastname', 'billing_company'];
9393
$filters = [];
9494
foreach ($searchFields as $field) {
9595
$filters[] = $this->filterBuilder

app/code/Magento/Bundle/Model/Product/SaveHandler.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public function __construct(
5858
}
5959

6060
/**
61+
* Perform action on Bundle product relation/extension attribute
62+
*
6163
* @param object $entity
6264
* @param array $arguments
6365
*
@@ -83,7 +85,7 @@ public function execute($entity, $arguments = [])
8385
: [];
8486

8587
if (!$entity->getCopyFromView()) {
86-
$this->processRemovedOptions($entity->getSku(), $existingOptionsIds, $optionIds);
88+
$this->processRemovedOptions($entity, $existingOptionsIds, $optionIds);
8789
$newOptionsIds = array_diff($optionIds, $existingOptionsIds);
8890
$this->saveOptions($entity, $bundleProductOptions, $newOptionsIds);
8991
} else {
@@ -96,6 +98,8 @@ public function execute($entity, $arguments = [])
9698
}
9799

98100
/**
101+
* Remove option product links
102+
*
99103
* @param string $entitySku
100104
* @param \Magento\Bundle\Api\Data\OptionInterface $option
101105
* @return void
@@ -154,16 +158,19 @@ private function getOptionIds(array $options): array
154158
/**
155159
* Removes old options that no longer exists.
156160
*
157-
* @param string $entitySku
161+
* @param ProductInterface $entity
158162
* @param array $existingOptionsIds
159163
* @param array $optionIds
160164
* @return void
161165
*/
162-
private function processRemovedOptions(string $entitySku, array $existingOptionsIds, array $optionIds): void
166+
private function processRemovedOptions(ProductInterface $entity, array $existingOptionsIds, array $optionIds): void
163167
{
168+
$metadata = $this->metadataPool->getMetadata(ProductInterface::class);
169+
$parentId = $entity->getData($metadata->getLinkField());
164170
foreach (array_diff($existingOptionsIds, $optionIds) as $optionId) {
165-
$option = $this->optionRepository->get($entitySku, $optionId);
166-
$this->removeOptionLinks($entitySku, $option);
171+
$option = $this->optionRepository->get($entity->getSku(), $optionId);
172+
$option->setParentId($parentId);
173+
$this->removeOptionLinks($entity->getSku(), $option);
167174
$this->optionRepository->delete($option);
168175
}
169176
}

app/code/Magento/Catalog/Api/CategoryLinkRepositoryInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,20 @@ public function save(\Magento\Catalog\Api\Data\CategoryProductLinkInterface $pro
3232
*
3333
* @throws \Magento\Framework\Exception\CouldNotSaveException
3434
* @throws \Magento\Framework\Exception\StateException
35+
* @throws \Magento\Framework\Exception\InputException
3536
*/
3637
public function delete(\Magento\Catalog\Api\Data\CategoryProductLinkInterface $productLink);
3738

3839
/**
3940
* Remove the product assignment from the category by category id and sku
4041
*
41-
* @param string $sku
42+
* @param string $categoryId
4243
* @param string $sku
4344
* @return bool will returned True if products successfully deleted
4445
*
4546
* @throws \Magento\Framework\Exception\CouldNotSaveException
4647
* @throws \Magento\Framework\Exception\StateException
48+
* @throws \Magento\Framework\Exception\InputException
4749
*/
4850
public function deleteByIds($categoryId, $sku);
4951
}

app/code/Magento/Catalog/Model/Layer/Filter/AbstractFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function apply(\Magento\Framework\App\RequestInterface $request)
139139
}
140140

141141
/**
142-
* Get fiter items count
142+
* Get filter items count
143143
*
144144
* @return int
145145
*/

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptions.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-61717"/>
1919
<group value="Catalog"/>
20+
<!-- skip due to MAGETWO-97424 -->
21+
<group value="skip"/>
2022
</annotations>
2123
<before>
2224
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>

app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
*/
66
namespace Magento\Cms\Controller\Adminhtml\Block;
77

8-
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
8+
use Magento\Framework\App\Action\HttpGetActionInterface;
99

10+
/**
11+
* Edit CMS block action.
12+
*/
1013
class Edit extends \Magento\Cms\Controller\Adminhtml\Block implements HttpGetActionInterface
1114
{
1215
/**

app/code/Magento/Cms/Controller/Adminhtml/Block/Index.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Cms\Controller\Adminhtml\Block;
87

9-
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
8+
use Magento\Framework\App\Action\HttpGetActionInterface;
109

10+
/**
11+
* Index action.
12+
*/
1113
class Index extends \Magento\Cms\Controller\Adminhtml\Block implements HttpGetActionInterface
1214
{
1315
/**

app/code/Magento/Cms/Controller/Adminhtml/Block/MassDelete.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
namespace Magento\Cms\Controller\Adminhtml\Block;
88

9+
use Magento\Framework\App\Action\HttpPostActionInterface;
910
use Magento\Framework\Controller\ResultFactory;
1011
use Magento\Backend\App\Action\Context;
1112
use Magento\Ui\Component\MassAction\Filter;
@@ -14,7 +15,7 @@
1415
/**
1516
* Class MassDelete
1617
*/
17-
class MassDelete extends \Magento\Backend\App\Action
18+
class MassDelete extends \Magento\Backend\App\Action implements HttpPostActionInterface
1819
{
1920
/**
2021
* Authorization level of a basic admin session

app/code/Magento/Cms/Controller/Adminhtml/Block/NewAction.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Cms\Controller\Adminhtml\Block;
87

9-
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
8+
use Magento\Framework\App\Action\HttpGetActionInterface;
109

10+
/**
11+
* Create CMS block action.
12+
*/
1113
class NewAction extends \Magento\Cms\Controller\Adminhtml\Block implements HttpGetActionInterface
1214
{
1315
/**

app/code/Magento/Cms/Controller/Adminhtml/Block/Save.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Cms\Controller\Adminhtml\Block;
87

9-
use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface;
8+
use Magento\Framework\App\Action\HttpPostActionInterface;
109
use Magento\Backend\App\Action\Context;
1110
use Magento\Cms\Api\BlockRepositoryInterface;
1211
use Magento\Cms\Model\Block;
@@ -15,6 +14,9 @@
1514
use Magento\Framework\Exception\LocalizedException;
1615
use Magento\Framework\Registry;
1716

17+
/**
18+
* Save CMS block action.
19+
*/
1820
class Save extends \Magento\Cms\Controller\Adminhtml\Block implements HttpPostActionInterface
1921
{
2022
/**

0 commit comments

Comments
 (0)