Skip to content

Commit eaf41d7

Browse files
author
Roman Ganin
committed
Merge branch 'develop' of https://github.corp.ebay.com/magento2/magento2ce into Troll_S31
2 parents b0f19b7 + deefb61 commit eaf41d7

File tree

1,160 files changed

+17545
-14465
lines changed

Some content is hidden

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

1,160 files changed

+17545
-14465
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/AdminNotification/Model/System/Message/Baseurl.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
namespace Magento\AdminNotification\Model\System\Message;
1010

11+
use Magento\Store\Model\Store;
12+
1113
class Baseurl implements \Magento\Framework\Notification\MessageInterface
1214
{
1315
/**
@@ -56,9 +58,9 @@ public function __construct(
5658
protected function _getConfigUrl()
5759
{
5860
$output = '';
59-
$defaultUnsecure = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default');
61+
$defaultUnsecure = $this->_config->getValue(Store::XML_PATH_UNSECURE_BASE_URL, 'default');
6062

61-
$defaultSecure = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, 'default');
63+
$defaultSecure = $this->_config->getValue(Store::XML_PATH_SECURE_BASE_URL, 'default');
6264

6365
if ($defaultSecure == \Magento\Store\Model\Store::BASE_URL_PLACEHOLDER ||
6466
$defaultUnsecure == \Magento\Store\Model\Store::BASE_URL_PLACEHOLDER

app/code/Magento/AdminNotification/Model/System/Message/Security.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
namespace Magento\AdminNotification\Model\System\Message;
1010

11+
use Magento\Store\Model\Store;
12+
1113
class Security implements \Magento\Framework\Notification\MessageInterface
1214
{
1315
/**
@@ -93,7 +95,7 @@ private function _canShowNotification()
9395
*/
9496
private function _isFileAccessible()
9597
{
96-
$unsecureBaseURL = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default');
98+
$unsecureBaseURL = $this->_config->getValue(Store::XML_PATH_UNSECURE_BASE_URL, 'default');
9799

98100
/** @var $http \Magento\Framework\HTTP\Adapter\Curl */
99101
$http = $this->_curlFactory->create();

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ abstract class AbstractAction extends \Magento\Framework\App\Action\Action
7272
protected $_canUseBaseUrl;
7373

7474
/**
75-
* @var \Magento\Core\App\Action\FormKeyValidator
75+
* @var \Magento\Framework\Data\Form\FormKey\Validator
7676
*/
7777
protected $_formKeyValidator;
7878

@@ -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/Context.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Context extends \Magento\Framework\App\Action\Context
3232
protected $_backendUrl;
3333

3434
/**
35-
* @var \Magento\Core\App\Action\FormKeyValidator
35+
* @var \Magento\Framework\Data\Form\FormKey\Validator
3636
*/
3737
protected $_formKeyValidator;
3838

@@ -66,7 +66,7 @@ class Context extends \Magento\Framework\App\Action\Context
6666
* @param \Magento\Backend\Model\Auth $auth
6767
* @param \Magento\Backend\Helper\Data $helper
6868
* @param \Magento\Backend\Model\UrlInterface $backendUrl
69-
* @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator
69+
* @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator
7070
* @param \Magento\Framework\Locale\ResolverInterface $localeResolver
7171
* @param bool $canUseBaseUrl
7272
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -86,7 +86,7 @@ public function __construct(
8686
\Magento\Backend\Model\Auth $auth,
8787
\Magento\Backend\Helper\Data $helper,
8888
\Magento\Backend\Model\UrlInterface $backendUrl,
89-
\Magento\Core\App\Action\FormKeyValidator $formKeyValidator,
89+
\Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator,
9090
\Magento\Framework\Locale\ResolverInterface $localeResolver,
9191
$canUseBaseUrl = false
9292
) {
@@ -146,7 +146,7 @@ public function getCanUseBaseUrl()
146146
}
147147

148148
/**
149-
* @return \Magento\Core\App\Action\FormKeyValidator
149+
* @return \Magento\Framework\Data\Form\FormKey\Validator
150150
*/
151151
public function getFormKeyValidator()
152152
{

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/App/Router.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
namespace Magento\Backend\App;
1010

11-
class Router extends \Magento\Core\App\Router\Base
11+
class Router extends \Magento\Framework\App\Router\Base
1212
{
1313
/**
1414
* @var \Magento\Backend\App\ConfigInterface
@@ -53,11 +53,9 @@ class Router extends \Magento\Core\App\Router\Base
5353
* @param \Magento\Framework\App\ResponseFactory $responseFactory
5454
* @param \Magento\Framework\App\Route\ConfigInterface $routeConfig
5555
* @param \Magento\Framework\UrlInterface $url
56-
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
57-
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
58-
* @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo
5956
* @param string $routerId
6057
* @param \Magento\Framework\Code\NameBuilder $nameBuilder
58+
* @param \Magento\Framework\App\Router\PathConfigInterface $pathConfig
6159
* @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig
6260
* @param \Magento\Backend\App\ConfigInterface $backendConfig
6361
*
@@ -70,11 +68,9 @@ public function __construct(
7068
\Magento\Framework\App\ResponseFactory $responseFactory,
7169
\Magento\Framework\App\Route\ConfigInterface $routeConfig,
7270
\Magento\Framework\UrlInterface $url,
73-
\Magento\Store\Model\StoreManagerInterface $storeManager,
74-
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
75-
\Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo,
7671
$routerId,
7772
\Magento\Framework\Code\NameBuilder $nameBuilder,
73+
\Magento\Framework\App\Router\PathConfigInterface $pathConfig,
7874
\Magento\Framework\App\Config\ScopeConfigInterface $coreConfig,
7975
\Magento\Backend\App\ConfigInterface $backendConfig
8076
) {
@@ -85,11 +81,9 @@ public function __construct(
8581
$responseFactory,
8682
$routeConfig,
8783
$url,
88-
$storeManager,
89-
$scopeConfig,
90-
$urlSecurityInfo,
9184
$routerId,
92-
$nameBuilder
85+
$nameBuilder,
86+
$pathConfig
9387
);
9488
$this->_coreConfig = $coreConfig;
9589
$this->_backendConfig = $backendConfig;

app/code/Magento/Backend/Block/System/Cache/Form.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@
1313
class Form extends \Magento\Backend\Block\Widget\Form\Generic
1414
{
1515
/**
16-
* @var \Magento\Core\Helper\Data
16+
* @var \Magento\Framework\App\Cache\TypeListInterface
1717
*/
18-
protected $_coreData;
18+
protected $cacheTypeList;
1919

2020
/**
2121
* @param \Magento\Backend\Block\Template\Context $context
2222
* @param \Magento\Framework\Registry $registry
2323
* @param \Magento\Framework\Data\FormFactory $formFactory
24-
* @param \Magento\Core\Helper\Data $coreData
24+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
2525
* @param array $data
2626
*/
2727
public function __construct(
2828
\Magento\Backend\Block\Template\Context $context,
2929
\Magento\Framework\Registry $registry,
3030
\Magento\Framework\Data\FormFactory $formFactory,
31-
\Magento\Core\Helper\Data $coreData,
31+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
3232
array $data = []
3333
) {
34-
$this->_coreData = $coreData;
34+
$this->cacheTypeList = $cacheTypeList;
3535
parent::__construct($context, $registry, $formFactory, $data);
3636
}
3737

@@ -63,7 +63,7 @@ public function initForm()
6363
]
6464
);
6565

66-
foreach ($this->_coreData->getCacheTypes() as $type => $label) {
66+
foreach ($this->cacheTypeList->getTypeLabels() as $type => $label) {
6767
$fieldset->addField(
6868
'enable_' . $type,
6969
'checkbox',

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
}

0 commit comments

Comments
 (0)