Skip to content

Commit 5326d33

Browse files
committed
Merge branch 'develop' into MAGETWO-34476
2 parents e27b569 + 44e90c4 commit 5326d33

File tree

355 files changed

+4200
-1659
lines changed

Some content is hidden

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

355 files changed

+4200
-1659
lines changed

app/code/Magento/Authorization/Model/Acl/AclRetriever.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ public function getAllowedResourcesByUser($userType, $userId)
7575
try {
7676
$role = $this->_getUserRole($userType, $userId);
7777
if (!$role) {
78-
throw new AuthorizationException('The role associated with the specified user cannot be found.');
78+
throw new AuthorizationException(
79+
__('The role associated with the specified user cannot be found.')
80+
);
7981
}
8082
$allowedResources = $this->getAllowedResourcesByRole($role->getId());
8183
} catch (AuthorizationException $e) {

app/code/Magento/Backend/Controller/Adminhtml/Ajax/Translate.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ class Translate extends \Magento\Backend\App\Action
1616
protected $inlineParser;
1717

1818
/**
19-
* @var \Magento\Framework\Controller\Result\JSONFactory
19+
* @var \Magento\Framework\Controller\Result\JsonFactory
2020
*/
2121
protected $resultJsonFactory;
2222

2323
/**
2424
* @param Action\Context $context
2525
* @param \Magento\Framework\Translate\Inline\ParserInterface $inlineParser
26-
* @param \Magento\Framework\Controller\Result\JSONFactory $resultJsonFactory
26+
* @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
2727
*/
2828
public function __construct(
2929
Action\Context $context,
3030
\Magento\Framework\Translate\Inline\ParserInterface $inlineParser,
31-
\Magento\Framework\Controller\Result\JSONFactory $resultJsonFactory
31+
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
3232
) {
3333
parent::__construct($context);
3434
$this->resultJsonFactory = $resultJsonFactory;
@@ -38,13 +38,13 @@ public function __construct(
3838
/**
3939
* Ajax action for inline translation
4040
*
41-
* @return \Magento\Framework\Controller\Result\JSON
41+
* @return \Magento\Framework\Controller\Result\Json
4242
*/
4343
public function execute()
4444
{
4545
$translate = (array)$this->getRequest()->getPost('translate');
4646

47-
/** @var \Magento\Framework\Controller\Result\JSON $resultJson */
47+
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
4848
$resultJson = $this->resultJsonFactory->create();
4949
try {
5050
$this->inlineParser->processAjaxPost($translate);

app/code/Magento/Backend/Controller/Adminhtml/Auth/DeniedJson.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
class DeniedJson extends \Magento\Backend\Controller\Adminhtml\Auth
1010
{
1111
/**
12-
* @var \Magento\Framework\Controller\Result\JSONFactory
12+
* @var \Magento\Framework\Controller\Result\JsonFactory
1313
*/
1414
protected $resultJsonFactory;
1515

1616
/**
1717
* @param \Magento\Backend\App\Action\Context $context
18-
* @param \Magento\Framework\Controller\Result\JSONFactory $resultJsonFactory
18+
* @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
1919
*/
2020
public function __construct(
2121
\Magento\Backend\App\Action\Context $context,
22-
\Magento\Framework\Controller\Result\JSONFactory $resultJsonFactory
22+
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
2323
) {
2424
parent::__construct($context);
2525
$this->resultJsonFactory = $resultJsonFactory;
@@ -41,11 +41,11 @@ protected function _getDeniedJson()
4141
/**
4242
* Denied JSON action
4343
*
44-
* @return \Magento\Framework\Controller\Result\JSON
44+
* @return \Magento\Framework\Controller\Result\Json
4545
*/
4646
public function execute()
4747
{
48-
/** @var \Magento\Framework\Controller\Result\JSON $resultJson */
48+
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
4949
$resultJson = $this->resultJsonFactory->create();
5050
return $resultJson->setData($this->_getDeniedJson());
5151
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected function _validateTypes(array $types)
7474
$allTypes = array_keys($this->_cacheTypeList->getTypes());
7575
$invalidTypes = array_diff($types, $allTypes);
7676
if (count($invalidTypes) > 0) {
77-
throw new LocalizedException(__("Specified cache type(s) don't exist: " . join(', ', $invalidTypes)));
77+
throw new LocalizedException(__('Specified cache type(s) don\'t exist: %1', join(', ', $invalidTypes)));
7878
}
7979
}
8080

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class GlobalSearch extends \Magento\Backend\Controller\Adminhtml\Index
1010
{
1111
/**
12-
* @var \Magento\Framework\Controller\Result\JSONFactory
12+
* @var \Magento\Framework\Controller\Result\JsonFactory
1313
*/
1414
protected $resultJsonFactory;
1515

@@ -22,12 +22,12 @@ class GlobalSearch extends \Magento\Backend\Controller\Adminhtml\Index
2222

2323
/**
2424
* @param \Magento\Backend\App\Action\Context $context
25-
* @param \Magento\Framework\Controller\Result\JSONFactory $resultJsonFactory
25+
* @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
2626
* @param array $searchModules
2727
*/
2828
public function __construct(
2929
\Magento\Backend\App\Action\Context $context,
30-
\Magento\Framework\Controller\Result\JSONFactory $resultJsonFactory,
30+
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
3131
array $searchModules = []
3232
) {
3333
$this->_searchModules = $searchModules;
@@ -38,7 +38,7 @@ public function __construct(
3838
/**
3939
* Global Search Action
4040
*
41-
* @return \Magento\Framework\Controller\Result\JSON
41+
* @return \Magento\Framework\Controller\Result\Json
4242
*/
4343
public function execute()
4444
{
@@ -87,7 +87,7 @@ public function execute()
8787
}
8888
}
8989

90-
/** @var \Magento\Framework\Controller\Result\JSON $resultJson */
90+
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
9191
$resultJson = $this->resultJsonFactory->create();
9292
return $resultJson->setData($items);
9393
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function execute()
7878
$user->sendPasswordResetNotificationEmail();
7979
}
8080
$this->messageManager->addSuccess(__('The account has been saved.'));
81-
} catch (\Magento\Framework\Validator\ValidatorException $e) {
81+
} catch (\Magento\Framework\Validator\Exception $e) {
8282
$this->messageManager->addMessages($e->getMessages());
8383
if ($e->getMessage()) {
8484
$this->messageManager->addError($e->getMessage());

app/code/Magento/Backend/Model/Auth.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\Framework\Exception\AuthenticationException;
99
use Magento\Framework\Exception\Plugin\AuthenticationException as PluginAuthenticationException;
10+
use Magento\Framework\Phrase;
1011

1112
/**
1213
* Backend Auth model
@@ -81,7 +82,7 @@ public function __construct(
8182
public function setAuthStorage($storage)
8283
{
8384
if (!$storage instanceof \Magento\Backend\Model\Auth\StorageInterface) {
84-
self::throwException('Authentication storage is incorrect.');
85+
self::throwException(__('Authentication storage is incorrect.'));
8586
}
8687
$this->_authStorage = $storage;
8788
return $this;
@@ -199,12 +200,12 @@ public function isLoggedIn()
199200
/**
200201
* Throws specific Backend Authentication \Exception
201202
*
202-
* @param string $msg
203+
* @param \Magento\Framework\Phrase $msg
203204
* @return void
204205
* @throws \Magento\Framework\Exception\AuthenticationException
205206
* @static
206207
*/
207-
public static function throwException($msg = null)
208+
public static function throwException(Phrase $msg = null)
208209
{
209210
if (is_null($msg)) {
210211
$msg = __('Authentication error occurred.');

app/code/Magento/Backend/Model/View/Layout/GeneratorPool.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ class GeneratorPool extends \Magento\Framework\View\Layout\GeneratorPool
2222
* @param ScheduledStructure\Helper $helper
2323
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
2424
* @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver
25+
* @param \Psr\Log\LoggerInterface $logger
2526
* @param Filter\Acl $aclFilter
2627
* @param array $generators
2728
*/
2829
public function __construct(
2930
ScheduledStructure\Helper $helper,
3031
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
3132
\Magento\Framework\App\ScopeResolverInterface $scopeResolver,
33+
\Psr\Log\LoggerInterface $logger,
3234
Filter\Acl $aclFilter,
3335
array $generators = null
3436
) {
@@ -37,6 +39,7 @@ public function __construct(
3739
$helper,
3840
$scopeConfig,
3941
$scopeResolver,
42+
$logger,
4043
$generators
4144
);
4245
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@
179179
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
180180
<comment>Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk.</comment>
181181
</field>
182+
<field id="minify_html" translate="label" type="select" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1">
183+
<label>Minify Html</label>
184+
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
185+
</field>
182186
</group>
183187
<group id="translate_inline" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
184188
<label>Translate Inline</label>

app/code/Magento/Backend/etc/config.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Store/etc/config.xsd">
99
<default>
10+
<dev>
11+
<template>
12+
<minify_html>1</minify_html>
13+
</template>
14+
</dev>
1015
<system>
1116
<media_storage_configuration>
1217
<allowed_resources>

0 commit comments

Comments
 (0)