Skip to content

Commit

Permalink
Merge branch 2.3-develop into ENGCOM-4595-magento-magento2-21948
Browse files Browse the repository at this point in the history
  • Loading branch information
magento-engcom-team committed Apr 5, 2019
2 parents 81ceece + 62ae101 commit 103b2f2
Show file tree
Hide file tree
Showing 322 changed files with 13,123 additions and 8,251 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ atlassian*
/pub/media/import/*
!/pub/media/import/.htaccess
/pub/media/logo/*
/pub/media/custom_options/*
!/pub/media/custom_options/.htaccess
/pub/media/theme/*
/pub/media/theme_customization/*
!/pub/media/theme_customization/.htaccess
Expand Down
14 changes: 14 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php

############################################
## enable usage of methods arguments in backtrace

SetEnv MAGE_DEBUG_SHOW_ARGS 1

############################################
## default index file

Expand Down Expand Up @@ -364,6 +369,15 @@
Require all denied
</IfVersion>
</Files>
<Files .user.ini>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>

# For 404s and 403s that aren't handled by the application, show plain 404 response
ErrorDocument 404 /pub/errors/404.php
Expand Down
14 changes: 14 additions & 0 deletions .htaccess.sample
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php

############################################
## enable usage of methods arguments in backtrace

SetEnv MAGE_DEBUG_SHOW_ARGS 1

############################################
## default index file

Expand Down Expand Up @@ -341,6 +346,15 @@
Require all denied
</IfVersion>
</Files>
<Files .user.ini>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>

# For 404s and 403s that aren't handled by the application, show plain 404 response
ErrorDocument 404 /pub/errors/404.php
Expand Down
1 change: 1 addition & 0 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Environment initialization
*/
error_reporting(E_ALL);
stream_wrapper_unregister('phar');
#ini_set('display_errors', 1);

/* PHP version validation */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

namespace Magento\AdminNotification\Block\Grid\Renderer;

/**
* Renderer class for action in the admin notifications grid
*
* @package Magento\AdminNotification\Block\Grid\Renderer
*/
class Actions extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
/**
Expand Down Expand Up @@ -37,7 +42,9 @@ public function __construct(
*/
public function render(\Magento\Framework\DataObject $row)
{
$readDetailsHtml = $row->getUrl() ? '<a class="action-details" target="_blank" href="' . $row->getUrl() . '">' .
$readDetailsHtml = $row->getUrl() ? '<a class="action-details" target="_blank" href="' .
$this->escapeUrl($row->getUrl())
. '">' .
__('Read Details') . '</a>' : '';

$markAsReadHtml = !$row->getIsRead() ? '<a class="action-mark" href="' . $this->getUrl(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ protected function setUp()
->setMethods(['getComment', 'getLabel'])
->disableOriginalConstructor()
->getMock();

$objectManager = new ObjectManager($this);
$escaper = $objectManager->getObject(\Magento\Framework\Escaper::class);
$reflection = new \ReflectionClass($this->abstractElementMock);
$reflection_property = $reflection->getProperty('_escaper');
$reflection_property->setAccessible(true);
$reflection_property->setValue($this->abstractElementMock, $escaper);

$this->abstractElementMock->setEscaper($escaper);
$this->contextMock = $this->getMockBuilder(Context::class)
->disableOriginalConstructor()
->getMock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ protected function setUp()
->setMethods(['getComment'])
->disableOriginalConstructor()
->getMock();

$objectManager = new ObjectManager($this);
$escaper = $objectManager->getObject(\Magento\Framework\Escaper::class);
$reflection = new \ReflectionClass($this->abstractElementMock);
$reflection_property = $reflection->getProperty('_escaper');
$reflection_property->setAccessible(true);
$reflection_property->setValue($this->abstractElementMock, $escaper);

$this->contextMock = $this->getMockBuilder(Context::class)
->setMethods(['getLocaleDate'])
->disableOriginalConstructor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ protected function setUp()
->setMethods(['getComment'])
->disableOriginalConstructor()
->getMock();

$objectManager = new ObjectManager($this);
$escaper = $objectManager->getObject(\Magento\Framework\Escaper::class);
$reflection = new \ReflectionClass($this->abstractElementMock);
$reflection_property = $reflection->getProperty('_escaper');
$reflection_property->setAccessible(true);
$reflection_property->setValue($this->abstractElementMock, $escaper);

$this->formMock = $this->getMockBuilder(Form::class)
->disableOriginalConstructor()
->getMock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ protected function setUp()
->setMethods(['getComment', 'getLabel', 'getHint'])
->disableOriginalConstructor()
->getMock();

$objectManager = new ObjectManager($this);
$escaper = $objectManager->getObject(\Magento\Framework\Escaper::class);
$reflection = new \ReflectionClass($this->abstractElementMock);
$reflection_property = $reflection->getProperty('_escaper');
$reflection_property->setAccessible(true);
$reflection_property->setValue($this->abstractElementMock, $escaper);

$this->contextMock = $this->getMockBuilder(Context::class)
->disableOriginalConstructor()
->getMock();
Expand Down
20 changes: 18 additions & 2 deletions app/code/Magento/Backend/Block/Widget/Form/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class Container extends \Magento\Backend\Block\Widget\Container
protected $_template = 'Magento_Backend::widget/form/container.phtml';

/**
* Initialize form.
*
* @return void
*/
protected function _construct()
Expand Down Expand Up @@ -83,7 +85,7 @@ protected function _construct()
-1
);

$objId = $this->getRequest()->getParam($this->_objectId);
$objId = (int)$this->getRequest()->getParam($this->_objectId);

if (!empty($objId)) {
$this->addButton(
Expand Down Expand Up @@ -151,11 +153,13 @@ public function getBackUrl()
}

/**
* Get URL for delete button.
*
* @return string
*/
public function getDeleteUrl()
{
return $this->getUrl('*/*/delete', [$this->_objectId => $this->getRequest()->getParam($this->_objectId)]);
return $this->getUrl('*/*/delete', [$this->_objectId => (int)$this->getRequest()->getParam($this->_objectId)]);
}

/**
Expand Down Expand Up @@ -183,6 +187,8 @@ public function getFormActionUrl()
}

/**
* Get form HTML.
*
* @return string
*/
public function getFormHtml()
Expand All @@ -192,6 +198,8 @@ public function getFormHtml()
}

/**
* Get form init scripts.
*
* @return string
*/
public function getFormInitScripts()
Expand All @@ -203,6 +211,8 @@ public function getFormInitScripts()
}

/**
* Get form scripts.
*
* @return string
*/
public function getFormScripts()
Expand All @@ -214,6 +224,8 @@ public function getFormScripts()
}

/**
* Get header width.
*
* @return string
*/
public function getHeaderWidth()
Expand All @@ -222,6 +234,8 @@ public function getHeaderWidth()
}

/**
* Get header css class.
*
* @return string
*/
public function getHeaderCssClass()
Expand All @@ -230,6 +244,8 @@ public function getHeaderCssClass()
}

/**
* Get header HTML.
*
* @return string
*/
public function getHeaderHtml()
Expand Down
34 changes: 31 additions & 3 deletions app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(
}

/**
* @return void
* @inheritdoc
*/
protected function _construct()
{
Expand All @@ -80,7 +80,7 @@ protected function _construct()
}

/**
* @return $this
* @inheritdoc
*/
protected function _prepareLayout()
{
Expand Down Expand Up @@ -182,6 +182,8 @@ public function getSuggestedCategoriesJson($namePart)
}

/**
* Get add root button html
*
* @return string
*/
public function getAddRootButtonHtml()
Expand All @@ -190,6 +192,8 @@ public function getAddRootButtonHtml()
}

/**
* Get add sub button html
*
* @return string
*/
public function getAddSubButtonHtml()
Expand All @@ -198,6 +202,8 @@ public function getAddSubButtonHtml()
}

/**
* Get expand button html
*
* @return string
*/
public function getExpandButtonHtml()
Expand All @@ -206,6 +212,8 @@ public function getExpandButtonHtml()
}

/**
* Get collapse button html
*
* @return string
*/
public function getCollapseButtonHtml()
Expand All @@ -214,6 +222,8 @@ public function getCollapseButtonHtml()
}

/**
* Get store switcher
*
* @return string
*/
public function getStoreSwitcherHtml()
Expand All @@ -222,6 +232,8 @@ public function getStoreSwitcherHtml()
}

/**
* Get loader tree url
*
* @param bool|null $expanded
* @return string
*/
Expand All @@ -235,6 +247,8 @@ public function getLoadTreeUrl($expanded = null)
}

/**
* Get nodes url
*
* @return string
*/
public function getNodesUrl()
Expand All @@ -243,6 +257,8 @@ public function getNodesUrl()
}

/**
* Get switcher tree url
*
* @return string
*/
public function getSwitchTreeUrl()
Expand All @@ -254,6 +270,8 @@ public function getSwitchTreeUrl()
}

/**
* Get is was expanded
*
* @return bool
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
*/
Expand All @@ -263,6 +281,8 @@ public function getIsWasExpanded()
}

/**
* Get move url
*
* @return string
*/
public function getMoveUrl()
Expand All @@ -271,6 +291,8 @@ public function getMoveUrl()
}

/**
* Get tree
*
* @param mixed|null $parenNodeCategory
* @return array
*/
Expand All @@ -282,6 +304,8 @@ public function getTree($parenNodeCategory = null)
}

/**
* Get tree json
*
* @param mixed|null $parenNodeCategory
* @return string
*/
Expand Down Expand Up @@ -367,7 +391,7 @@ protected function _getNodeJson($node, $level = 0)
}
}

if ($isParent || $node->getLevel() < 2) {
if ($isParent || $node->getLevel() < 1) {
$item['expanded'] = true;
}

Expand All @@ -390,6 +414,8 @@ public function buildNodeName($node)
}

/**
* Is category movable
*
* @param Node|array $node
* @return bool
*/
Expand All @@ -403,6 +429,8 @@ protected function _isCategoryMoveable($node)
}

/**
* Is parent selected category
*
* @param Node|array $node
* @return bool
*/
Expand Down
Loading

0 comments on commit 103b2f2

Please sign in to comment.