Skip to content

Commit 7351cbb

Browse files
committed
Merge remote-tracking branch 'mainline/2.2.6-develop' into 2.2.7-develop
2 parents 14c22fe + 6a2637e commit 7351cbb

File tree

118 files changed

+3202
-6297
lines changed

Some content is hidden

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

118 files changed

+3202
-6297
lines changed

CHANGELOG.md

Lines changed: 497 additions & 0 deletions
Large diffs are not rendered by default.

app/code/Magento/Backend/Controller/Adminhtml/System/Store/DeleteGroupPost.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,28 @@
77
namespace Magento\Backend\Controller\Adminhtml\System\Store;
88

99
use Magento\Framework\Controller\ResultFactory;
10+
use Magento\Framework\App\Request\Http as HttpRequest;
11+
use Magento\Framework\Exception\NotFoundException;
1012

1113
class DeleteGroupPost extends \Magento\Backend\Controller\Adminhtml\System\Store
1214
{
1315
/**
1416
* @return \Magento\Backend\Model\View\Result\Redirect
17+
* @throws NotFoundException
1518
*/
1619
public function execute()
1720
{
18-
$itemId = $this->getRequest()->getParam('item_id');
19-
21+
/** @var HttpRequest $request */
22+
$request = $this->getRequest();
2023
/** @var \Magento\Backend\Model\View\Result\Redirect $redirectResult */
21-
$redirectResult = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
24+
$redirectResult = $this->resultFactory->create(
25+
ResultFactory::TYPE_REDIRECT
26+
);
27+
if (!$request->isPost()) {
28+
throw new NotFoundException(__('Page not found.'));
29+
}
2230

31+
$itemId = $request->getParam('item_id');
2332
if (!($model = $this->_objectManager->create(\Magento\Store\Model\Group::class)->load($itemId))) {
2433
$this->messageManager->addErrorMessage(__('Something went wrong. Please try again.'));
2534
return $redirectResult->setPath('adminhtml/*/');

app/code/Magento/Backend/Controller/Adminhtml/System/Store/DeleteStorePost.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,31 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\System\Store;
88

9+
use Magento\Framework\App\Request\Http as HttpRequest;
910
use Magento\Framework\Controller\ResultFactory;
11+
use Magento\Framework\Exception\NotFoundException;
1012

1113
class DeleteStorePost extends \Magento\Backend\Controller\Adminhtml\System\Store
1214
{
1315
/**
1416
* Delete store view post action
1517
*
1618
* @return \Magento\Backend\Model\View\Result\Redirect
19+
* @throws NotFoundException
1720
*/
1821
public function execute()
1922
{
20-
$itemId = $this->getRequest()->getParam('item_id');
21-
23+
/** @var HttpRequest $request */
24+
$request = $this->getRequest();
2225
/** @var \Magento\Backend\Model\View\Result\Redirect $redirectResult */
23-
$redirectResult = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
26+
$redirectResult = $this->resultFactory->create(
27+
ResultFactory::TYPE_REDIRECT
28+
);
29+
if (!$request->isPost()) {
30+
throw new NotFoundException(__('Page not found.'));
31+
}
32+
33+
$itemId = $request->getParam('item_id');
2434
if (!($model = $this->_objectManager->create(\Magento\Store\Model\Store::class)->load($itemId))) {
2535
$this->messageManager->addErrorMessage(__('Something went wrong. Please try again.'));
2636
return $redirectResult->setPath('adminhtml/*/');

app/code/Magento/Backend/Controller/Adminhtml/System/Store/DeleteWebsitePost.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,30 @@
77
namespace Magento\Backend\Controller\Adminhtml\System\Store;
88

99
use Magento\Framework\Controller\ResultFactory;
10+
use Magento\Framework\App\Request\Http as HttpRequest;
11+
use Magento\Framework\Exception\NotFoundException;
1012

1113
class DeleteWebsitePost extends \Magento\Backend\Controller\Adminhtml\System\Store
1214
{
1315
/**
1416
* @return \Magento\Backend\Model\View\Result\Redirect
17+
* @throws NotFoundException
1518
*/
1619
public function execute()
1720
{
18-
$itemId = $this->getRequest()->getParam('item_id');
19-
$model = $this->_objectManager->create(\Magento\Store\Model\Website::class);
20-
$model->load($itemId);
21-
21+
/** @var HttpRequest $request */
22+
$request = $this->getRequest();
2223
/** @var \Magento\Backend\Model\View\Result\Redirect $redirectResult */
23-
$redirectResult = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
24+
$redirectResult = $this->resultFactory->create(
25+
ResultFactory::TYPE_REDIRECT
26+
);
27+
if (!$request->isPost()) {
28+
throw new NotFoundException(__('Page not found.'));
29+
}
2430

31+
$itemId = $request->getParam('item_id');
32+
$model = $this->_objectManager->create(\Magento\Store\Model\Website::class);
33+
$model->load($itemId);
2534
if (!$model) {
2635
$this->messageManager->addErrorMessage(__('Something went wrong. Please try again.'));
2736
return $redirectResult->setPath('adminhtml/*/');

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<% if (data.items.length) { %>
4040
<% _.each(data.items, function(value){ %>
4141
<li class="item"
42-
<%- data.optionData(value) %>
42+
<%= data.optionData(value) %>
4343
>
4444
<a href="<%- value.url %>" class="title"><%- value.name %></a>
4545
<span class="type"><%- value.type %></span>

app/code/Magento/Catalog/Console/Command/PriceIndexerDimensionsModeSetCommand.php

Lines changed: 0 additions & 196 deletions
This file was deleted.

app/code/Magento/Catalog/Controller/Adminhtml/Category/Image/Upload.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ public function execute()
5454

5555
try {
5656
$result = $this->imageUploader->saveFileToTmpDir($imageId);
57-
58-
$result['cookie'] = [
59-
'name' => $this->_getSession()->getName(),
60-
'value' => $this->_getSession()->getSessionId(),
61-
'lifetime' => $this->_getSession()->getCookieLifetime(),
62-
'path' => $this->_getSession()->getCookiePath(),
63-
'domain' => $this->_getSession()->getCookieDomain(),
64-
];
6557
} catch (\Exception $e) {
6658
$result = ['error' => $e->getMessage(), 'errorcode' => $e->getCode()];
6759
}

app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Ui\Component\MassAction\Filter;
1212
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
1313
use Magento\Catalog\Api\ProductRepositoryInterface;
14+
use Magento\Framework\Exception\NotFoundException;
1415

1516
class MassDelete extends \Magento\Catalog\Controller\Adminhtml\Product
1617
{
@@ -54,9 +55,15 @@ public function __construct(
5455

5556
/**
5657
* @return \Magento\Backend\Model\View\Result\Redirect
58+
* @throws NotFoundException
59+
* @throws \Magento\Framework\Exception\LocalizedException
60+
* @throws \Magento\Framework\Exception\StateException
5761
*/
5862
public function execute()
5963
{
64+
if (!$this->getRequest()->isPost()) {
65+
throw new NotFoundException(__('Page not found'));
66+
}
6067
$collection = $this->filter->getCollection($this->collectionFactory->create());
6168
$productDeleted = 0;
6269
/** @var \Magento\Catalog\Model\Product $product */

0 commit comments

Comments
 (0)