Skip to content

Commit

Permalink
Merge branch '2.3-develop' of github.com:magento/magento2 into msi-2.…
Browse files Browse the repository at this point in the history
…3-develop

Conflicts:
	composer.lock
  • Loading branch information
ishakhsuvarov committed Apr 3, 2019
2 parents 8be282a + 4a28abb commit ea18b85
Show file tree
Hide file tree
Showing 281 changed files with 11,138 additions and 8,208 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

0 comments on commit ea18b85

Please sign in to comment.