Skip to content

Commit fe4a110

Browse files
author
Dmytro Aponasenko
committed
Merge branch 'develop' of https://github.corp.ebay.com/magento2/magento2ce into develop
2 parents 54eda20 + a9e59f8 commit fe4a110

File tree

259 files changed

+3382
-1734
lines changed

Some content is hidden

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

259 files changed

+3382
-1734
lines changed

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/AjaxMarkAsRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AjaxMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Not
1515
*/
1616
public function execute()
1717
{
18-
if (!$this->getRequest()->getPost()) {
18+
if (!$this->getRequest()->getPostValue()) {
1919
return;
2020
}
2121
$notificationId = (int)$this->getRequest()->getPost('id');

app/code/Magento/Backend/App/AbstractAction.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
202202
}
203203

204204
if ($request->isDispatched() && $request->getActionName() !== 'denied' && !$this->_isAllowed()) {
205-
$this->_response->setHeader('HTTP/1.1', '403 Forbidden');
206-
$this->_response->setHttpResponseCode(403);
205+
$this->_response->setStatusHeader(403, '1.1', 'Forbidden');
207206
if (!$this->_auth->isLoggedIn()) {
208207
return $this->_redirect('*/auth/login');
209208
}

app/code/Magento/Backend/App/Action/Plugin/Authentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ protected function _performLogin(\Magento\Framework\App\RequestInterface $reques
163163
$postLogin = $request->getPost('login');
164164
$username = isset($postLogin['username']) ? $postLogin['username'] : '';
165165
$password = isset($postLogin['password']) ? $postLogin['password'] : '';
166-
$request->setPost('login', null);
166+
$request->setPostValue('login', null);
167167

168168
try {
169169
$this->_auth->login($username, $password);

app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function aroundDispatch(
2828
if ($key) {
2929
$postData = $request->getPost($key);
3030
$value = is_array($postData) ? $postData : explode(',', $postData);
31-
$request->setPost($key, $value ? $value : null);
31+
$request->setPostValue($key, $value ? $value : null);
3232
}
3333
return $proceed($request);
3434
}

app/code/Magento/Backend/Controller/Adminhtml/Denied.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public function execute()
4141
if (!$this->_auth->isLoggedIn()) {
4242
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
4343
$resultRedirect = $this->resultRedirectFactory->create();
44-
$resultRedirect->setHeader('HTTP/1.1', '403 Forbidden');
44+
$resultRedirect->setStatusHeader(403, '1.1', 'Forbidden');
4545
return $resultRedirect->setPath('*/auth/login');
4646
}
4747
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
4848
$resultPage = $this->resultPageFactory->create();
49-
$resultPage->setHeader('HTTP/1.1', '403 Forbidden');
49+
$resultPage->setStatusHeader(403, '1.1', 'Forbidden');
5050
$resultPage->addHandle('adminhtml_denied');
5151
return $resultPage;
5252
}

app/code/Magento/Backend/Controller/Adminhtml/Noroute/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function execute()
3434
{
3535
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
3636
$resultPage = $this->resultPageFactory->create();
37-
$resultPage->setHeader('HTTP/1.1', '404 Not Found');
37+
$resultPage->setStatusHeader(404, '1.1', 'Forbidden');
3838
$resultPage->setHeader('Status', '404 File not found');
3939
$resultPage->addHandle('adminhtml_noroute');
4040
return $resultPage;

app/code/Magento/Backend/Controller/Adminhtml/System/Design/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function _filterPostData($data)
3030
*/
3131
public function execute()
3232
{
33-
$data = $this->getRequest()->getPost();
33+
$data = $this->getRequest()->getPostValue();
3434
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
3535
$resultRedirect = $this->resultRedirectFactory->create();
3636

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function execute()
1717
{
1818
/** @var \Magento\Backend\Model\View\Result\Redirect $redirectResult */
1919
$redirectResult = $this->resultRedirectFactory->create();
20-
if ($this->getRequest()->isPost() && ($postData = $this->getRequest()->getPost())) {
20+
if ($this->getRequest()->isPost() && ($postData = $this->getRequest()->getPostValue())) {
2121
if (empty($postData['store_type']) || empty($postData['store_action'])) {
2222
$redirectResult->setPath('adminhtml/*/');
2323
return $redirectResult;

app/code/Magento/Backend/etc/adminhtml/di.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717
<preference for="Magento\Backend\App\ConfigInterface" type="Magento\Backend\App\Config" />
1818
<preference for="Magento\Framework\App\Response\Http\FileFactory" type="Magento\Backend\App\Response\Http\FileFactory" />
1919
<preference for="Magento\Framework\View\Layout\GeneratorPool" type="Magento\Backend\Model\View\Layout\GeneratorPool" />
20-
<preference for="pageLayoutGeneratorPool" type="Magento\Backend\Model\View\Layout\GeneratorPool" />
20+
<type name="Magento\Framework\View\Result\Page">
21+
<arguments>
22+
<argument name="layoutReaderPool" xsi:type="object">pageConfigRenderPool</argument>
23+
<argument name="generatorPool" xsi:type="object">Magento\Backend\Model\View\Layout\GeneratorPool</argument>
24+
<argument name="template" xsi:type="string">Magento_Theme::root.phtml</argument>
25+
</arguments>
26+
</type>
2127
<preference for="Magento\Framework\View\Layout\Reader\Block" type="Magento\Backend\Model\View\Layout\Reader\Block" />
2228
<preference for="Magento\Framework\Model\ActionValidator\RemoveAction" type="Magento\Framework\Model\ActionValidator\RemoveAction\Allowed" />
2329
<preference for="Magento\Framework\Session\Config\ConfigInterface" type="Magento\Backend\Model\Session\AdminConfig" />

app/code/Magento/Captcha/Model/Observer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function checkUserCreate($observer)
204204
if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) {
205205
$this->messageManager->addError(__('Incorrect CAPTCHA'));
206206
$this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true);
207-
$this->_session->setCustomerFormData($controller->getRequest()->getPost());
207+
$this->_session->setCustomerFormData($controller->getRequest()->getPostValue());
208208
$url = $this->_urlManager->getUrl('*/*/create', ['_nosecret' => true]);
209209
$controller->getResponse()->setRedirect($this->redirect->error($url));
210210
}

0 commit comments

Comments
 (0)