Skip to content

Commit e803247

Browse files
committed
MAGETWO-70165: Fix for file category image uploader #10033
- Merge Pull Request #10033 from Bartlomiejsz/magento2:FileUploader_Fix - Merged commits: 1. 1948b8d
2 parents d844e31 + 1948b8d commit e803247

File tree

493 files changed

+7665
-1924
lines changed

Some content is hidden

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

493 files changed

+7665
-1924
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sudo: required
22
dist: trusty
3+
group: edge
34
addons:
45
apt:
56
packages:

app/code/Magento/Analytics/README.md

Lines changed: 776 additions & 8 deletions
Large diffs are not rendered by default.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

app/code/Magento/Authorization/Model/ResourceModel/Rules.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Authorization\Model\ResourceModel;
108

119
use Magento\Framework\App\ObjectManager;
@@ -101,7 +99,10 @@ public function saveRel(\Magento\Authorization\Model\Rules $rule)
10199

102100
// If all was selected save it only and nothing else.
103101
if ($postedResources === [$this->_rootResource->getId()]) {
104-
$insertData = $this->_prepareDataForTable(new \Magento\Framework\DataObject($row), $this->getMainTable());
102+
$insertData = $this->_prepareDataForTable(
103+
new \Magento\Framework\DataObject($row),
104+
$this->getMainTable()
105+
);
105106

106107
$connection->insert($this->getMainTable(), $insertData);
107108
} else {
@@ -113,7 +114,10 @@ public function saveRel(\Magento\Authorization\Model\Rules $rule)
113114
$row['permission'] = in_array($resourceId, $postedResources) ? 'allow' : 'deny';
114115
$row['resource_id'] = $resourceId;
115116

116-
$insertData = $this->_prepareDataForTable(new \Magento\Framework\DataObject($row), $this->getMainTable());
117+
$insertData = $this->_prepareDataForTable(
118+
new \Magento\Framework\DataObject($row),
119+
$this->getMainTable()
120+
);
117121
$connection->insert($this->getMainTable(), $insertData);
118122
}
119123
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/**
99
* Generic backend controller
1010
*
11+
* @api
1112
* @SuppressWarnings(PHPMD.NumberOfChildren)
1213
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1314
*/

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Magento\Backend\App;
1111

1212
/**
13+
* @api
1314
* @SuppressWarnings(PHPMD.NumberOfChildren)
1415
*/
1516
abstract class Action extends \Magento\Backend\App\AbstractAction

app/code/Magento/Backend/App/Action/Context.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@
88
use Magento\Framework\Controller\ResultFactory;
99

1010
/**
11-
* Backend Controller context
11+
* Constructor modification point for Magento\Backend\App\Action.
12+
*
13+
* All context classes were introduced to allow for backwards compatible constructor modifications
14+
* of classes that were supposed to be extended by extension developers.
15+
*
16+
* Do not call methods of this class directly.
17+
*
18+
* As Magento moves from inheritance-based APIs all such classes will be deprecated together with
19+
* the classes they were introduced for.
20+
*
21+
* @api
1222
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1323
*/
1424
class Context extends \Magento\Framework\App\Action\Context

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
* See COPYING.txt for license details.
77
*/
88

9-
// @codingStandardsIgnoreFile
10-
119
namespace Magento\Backend\App;
1210

1311
use Magento\Config\App\Config\Type\System;

app/code/Magento/Backend/Block/AbstractBlock.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
namespace Magento\Backend\Block;
77

88
/**
9-
* Backend abstract block
9+
* Base for all admin blocks.
10+
*
11+
* Avoid using this class. Will be deprecated
12+
*
13+
* Marked as public API because it is actively used now.
14+
* @api
1015
*/
1116
class AbstractBlock extends \Magento\Framework\View\Element\AbstractBlock
1217
{

app/code/Magento/Backend/Block/Context.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
<?php
22
/**
3-
* Backend block context
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
86
namespace Magento\Backend\Block;
97

108
/**
11-
* Backend block context
9+
* Constructor modification point for Magento\Backend\Block\AbstractBlock.
10+
*
11+
* All context classes were introduced to allow for backwards compatible constructor modifications
12+
* of classes that were supposed to be extended by extension developers.
13+
*
14+
* Do not call methods of this class directly.
15+
*
16+
* As Magento moves from inheritance-based APIs all such classes will be deprecated together with
17+
* the classes they were introduced for.
1218
*
19+
* @api
1320
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1421
*/
1522
class Context extends \Magento\Framework\View\Element\Context

app/code/Magento/Backend/Block/Dashboard.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Backend\Block;
108

119
/**

app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Backend\Block\Dashboard;
108

9+
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
10+
1111
/**
1212
* Adminhtml dashboard tab abstract
1313
*
@@ -40,7 +40,7 @@ public function __construct(
4040
}
4141

4242
/**
43-
* @return array|\Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection|\Magento\Eav\Model\Entity\Collection\Abstract
43+
* @return array|AbstractCollection|\Magento\Eav\Model\Entity\Collection\Abstract
4444
*/
4545
public function getCollection()
4646
{

app/code/Magento/Backend/Block/Menu.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,13 @@ protected function _renderMouseEvent($menuItem)
148148
protected function _renderItemCssClass($menuItem, $level)
149149
{
150150
$isLast = 0 == $level && (bool)$this->getMenuModel()->isLast($menuItem) ? 'last' : '';
151-
$output = ($this->menuItemChecker->isItemActive(
151+
$isItemActive = $this->menuItemChecker->isItemActive(
152152
$this->getActiveItemModel(),
153-
$menuItem,
154-
$level
155-
) ? '_current _active' : '') .
153+
$menuItem,
154+
$level
155+
) ? '_current _active' : '';
156+
157+
$output = $isItemActive .
156158
' ' .
157159
($menuItem->hasChildren() ? 'parent' : '') .
158160
' ' .
@@ -411,7 +413,7 @@ public function renderNavigation($menu, $level = 0, $limit = 0, $colBrakes = [])
411413
*/
412414
public function getActiveItemModel()
413415
{
414-
if (is_null($this->_activeItemModel)) {
416+
if ($this->_activeItemModel === null) {
415417
$this->_activeItemModel = $this->getMenuModel()->get($this->getActive());
416418
if (false == $this->_activeItemModel instanceof \Magento\Backend\Model\Menu\Item) {
417419
$this->_activeItemModel = false;

app/code/Magento/Backend/Block/Page/Header.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Backend\Block\Page;
108

119
/**
@@ -81,6 +79,9 @@ public function getLogoutLink()
8179
*/
8280
public function displayNoscriptNotice()
8381
{
84-
return $this->_scopeConfig->getValue('web/browser_capabilities/javascript', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
82+
return $this->_scopeConfig->getValue(
83+
'web/browser_capabilities/javascript',
84+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
85+
);
8586
}
8687
}

app/code/Magento/Backend/Block/Page/Notices.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
/**
108
* Adminhtml header notices block
119
*
@@ -25,7 +23,10 @@ class Notices extends \Magento\Backend\Block\Template
2523
*/
2624
public function displayNoscriptNotice()
2725
{
28-
return $this->_scopeConfig->getValue('web/browser_capabilities/javascript', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
26+
return $this->_scopeConfig->getValue(
27+
'web/browser_capabilities/javascript',
28+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
29+
);
2930
}
3031

3132
/**
@@ -35,6 +36,9 @@ public function displayNoscriptNotice()
3536
*/
3637
public function displayDemoNotice()
3738
{
38-
return $this->_scopeConfig->getValue('design/head/demonotice', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
39+
return $this->_scopeConfig->getValue(
40+
'design/head/demonotice',
41+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
42+
);
3943
}
4044
}

app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Backend\Block\Page\System\Config\Robots;
108

119
use Magento\Framework\App\Config\ScopeConfigInterface;
@@ -53,7 +51,8 @@ protected function _construct()
5351
public function getRobotsDefaultCustomInstructions()
5452
{
5553
return trim((string)$this->_scopeConfig->getValue(
56-
self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, ScopeConfigInterface::SCOPE_TYPE_DEFAULT
54+
self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS,
55+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT
5756
));
5857
}
5958

app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Backend\Block\Store\Switcher\Form\Renderer;
108

9+
use \Magento\Framework\Data\Form\Element\Renderer\RendererInterface;
10+
1111
/**
1212
* Form fieldset renderer
1313
*/
14-
class Fieldset extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface
14+
class Fieldset extends \Magento\Backend\Block\Template implements RendererInterface
1515
{
1616
/**
1717
* Form element which re-rendering

app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Backend\Block\System\Design\Edit\Tab;
108

119
class General extends \Magento\Backend\Block\Widget\Form\Generic
@@ -66,7 +64,7 @@ protected function _prepareForm()
6664
]
6765
);
6866
$renderer = $this->getLayout()->createBlock(
69-
\Magento\Backend\Block\Store\Switcher\Form\Renderer\Fieldset\Element::class
67+
\Magento\Backend\Block\Store\Switcher\Form\Renderer\Fieldset\Element::class
7068
);
7169
$field->setRenderer($renderer);
7270
} else {

app/code/Magento/Backend/Block/Template.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@
66
namespace Magento\Backend\Block;
77

88
/**
9-
* Backend abstract block
9+
* Standard admin block. Adds admin-specific behavior and event.
10+
* Should be used when you declare a block in admin layout handle.
11+
*
12+
* Avoid extending this class if possible.
13+
*
14+
* If you need custom presentation logic in your blocks, use this class as block, and declare
15+
* custom view models in block arguments in layout handle file.
16+
*
17+
* Example:
18+
* <block name="my.block" class="Magento\Backend\Block\Template" template="My_Module::template.phtml" >
19+
* <arguments>
20+
* <argument name="viewModel" xsi:type="object">My\Module\ViewModel\Custom</argument>
21+
* </arguments>
22+
* </block>
1023
*
1124
* @api
1225
* @SuppressWarnings(PHPMD.NumberOfChildren)

app/code/Magento/Backend/Block/Template/Context.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
<?php
22
/**
3-
* Backend block template context
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
8-
96
namespace Magento\Backend\Block\Template;
107

118
/**
9+
* Constructor modification point for Magento\Backend\Block\Template.
10+
*
11+
* All context classes were introduced to allow for backwards compatible constructor modifications
12+
* of classes that were supposed to be extended by extension developers.
13+
*
14+
* Do not call methods of this class directly.
15+
*
16+
* As Magento moves from inheritance-based APIs all such classes will be deprecated together with
17+
* the classes they were introduced for.
18+
*
19+
* @api
1220
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1321
*/
1422
class Context extends \Magento\Framework\View\Element\Template\Context

app/code/Magento/Backend/Block/Widget.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
/**
99
* Base widget class
1010
*
11-
* @author Magento Core Team <[email protected]>
12-
*
11+
* @api
1312
* @SuppressWarnings(PHPMD.NumberOfChildren)
1413
*/
1514
class Widget extends \Magento\Backend\Block\Template

app/code/Magento/Backend/Block/Widget/Accordion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Magento_Backend accordion widget
1010
*
11-
* @author Magento Core Team <[email protected]>
11+
* @api
1212
*/
1313
class Accordion extends \Magento\Backend\Block\Widget
1414
{

app/code/Magento/Backend/Block/Widget/Context.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
76
namespace Magento\Backend\Block\Widget;
87

98
/**
9+
* Constructor modification point for Magento\Backend\Block\Widget.
10+
*
11+
* All context classes were introduced to allow for backwards compatible constructor modifications
12+
* of classes that were supposed to be extended by extension developers.
13+
*
14+
* Do not call methods of this class directly.
15+
*
16+
* As Magento moves from inheritance-based APIs all such classes will be deprecated together with
17+
* the classes they were introduced for.
18+
*
19+
* @api
1020
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1121
*/
1222
class Context extends \Magento\Backend\Block\Template\Context

app/code/Magento/Backend/Block/Widget/Form.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
/**
99
* Backend form widget
1010
*
11+
* @api
12+
* @deprecated in favour of UI component implementation
1113
* @SuppressWarnings(PHPMD.NumberOfChildren)
1214
*/
1315
class Form extends \Magento\Backend\Block\Widget

app/code/Magento/Backend/Block/Widget/Form/Container.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
/**
99
* Backend form container block
1010
*
11-
* @author Magento Core Team <[email protected]>
11+
* @api
12+
* @deprecated in favour of UI component implementation
1213
* @SuppressWarnings(PHPMD.NumberOfChildren)
1314
*/
1415
class Container extends \Magento\Backend\Block\Widget\Container

0 commit comments

Comments
 (0)