Skip to content

Commit 1f90136

Browse files
committed
MAGETWO-70491: Merge branch 'develop' of github.com:magento/magento2ce into MAGETWO-70491-PR-9796
2 parents a3c1623 + aa4ae30 commit 1f90136

File tree

393 files changed

+18323
-1707
lines changed

Some content is hidden

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

393 files changed

+18323
-1707
lines changed

app/code/Magento/Analytics/README.md

Lines changed: 18 additions & 773 deletions
Large diffs are not rendered by default.

app/code/Magento/Analytics/view/adminhtml/templates/dashboard/section.phtml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
<div class="dashboard-advanced-reports-content">
1515
<?= $block->escapeHtml(__('Gain new insights and take command of your business\' performance,' .
1616
' using our dynamic product, order, and customer reports tailored to your customer data.')) ?>
17-
<a href="<?= $block->escapeUrl($block->getUrl('analytics/reports/show')) ?>"
18-
target="_blank"
19-
data-index="analytics-service-info-link">
20-
<?= $block->escapeHtml(__('View details')) ?>
21-
</a>
2217
</div>
2318
</div>
2419
<div class="dashboard-advanced-reports-actions">

app/code/Magento/Backend/Block/System/Store/Edit.php

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
*/
66
namespace Magento\Backend\Block\System\Store;
77

8+
use Magento\Framework\App\ObjectManager;
9+
use Magento\Framework\Serialize\SerializerInterface;
10+
811
/**
12+
* @api
13+
*
914
* Adminhtml store edit
1015
*/
1116
class Edit extends \Magento\Backend\Block\Widget\Form\Container
@@ -17,17 +22,25 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container
1722
*/
1823
protected $_coreRegistry = null;
1924

25+
/**
26+
* @var SerializerInterface
27+
*/
28+
private $serializer;
29+
2030
/**
2131
* @param \Magento\Backend\Block\Widget\Context $context
2232
* @param \Magento\Framework\Registry $registry
2333
* @param array $data
34+
* @param SerializerInterface|null $serializer
2435
*/
2536
public function __construct(
2637
\Magento\Backend\Block\Widget\Context $context,
2738
\Magento\Framework\Registry $registry,
28-
array $data = []
39+
array $data = [],
40+
SerializerInterface $serializer = null
2941
) {
3042
$this->_coreRegistry = $registry;
43+
$this->serializer = $serializer ?: ObjectManager::getInstance()->get(SerializerInterface::class);
3144
parent::__construct($context, $data);
3245
}
3346

@@ -127,4 +140,14 @@ protected function _buildFormClassName()
127140
{
128141
return parent::_buildFormClassName() . '\\' . ucwords($this->_coreRegistry->registry('store_type'));
129142
}
143+
144+
/**
145+
* Get data for store edit
146+
*
147+
* @return string
148+
*/
149+
public function getStoreData()
150+
{
151+
return $this->serializer->serialize($this->_coreRegistry->registry('store_data')->getData());
152+
}
130153
}

app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function getHtml()
131131
public function getEscapedValue($index = null)
132132
{
133133
$value = $this->getValue($index);
134-
if ($value instanceof \DateTime) {
134+
if ($value instanceof \DateTimeInterface) {
135135
return $this->dateTimeFormatter->formatObject(
136136
$value,
137137
$this->_localeDate->getDateFormat(\IntlDateFormatter::SHORT)

app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function getEscapedValue($index = null)
147147
{
148148
if ($this->getColumn()->getFilterTime()) {
149149
$value = $this->getValue($index);
150-
if ($value instanceof \DateTime) {
150+
if ($value instanceof \DateTimeInterface) {
151151
return $this->_localeDate->formatDateTime($value);
152152
}
153153
return $value;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,13 @@ public function isLoggedIn()
168168
*/
169169
public function prolong()
170170
{
171+
$lifetime = $this->_config->getValue(self::XML_PATH_SESSION_LIFETIME);
171172
$cookieValue = $this->cookieManager->getCookie($this->getName());
173+
172174
if ($cookieValue) {
173175
$this->setUpdatedAt(time());
174176
$cookieMetadata = $this->cookieMetadataFactory->createPublicCookieMetadata()
177+
->setDuration($lifetime)
175178
->setPath($this->sessionConfig->getCookiePath())
176179
->setDomain($this->sessionConfig->getCookieDomain())
177180
->setSecure($this->sessionConfig->getCookieSecure())

app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,21 @@ public function testProlong()
158158
{
159159
$name = session_name();
160160
$cookie = 'cookie';
161+
$lifetime = 900;
161162
$path = '/';
162163
$domain = 'magento2';
163164
$secure = true;
164165
$httpOnly = true;
165166

167+
$this->config->expects($this->once())
168+
->method('getValue')
169+
->with(\Magento\Backend\Model\Auth\Session::XML_PATH_SESSION_LIFETIME)
170+
->willReturn($lifetime);
166171
$cookieMetadata = $this->getMock(\Magento\Framework\Stdlib\Cookie\PublicCookieMetadata::class);
172+
$cookieMetadata->expects($this->once())
173+
->method('setDuration')
174+
->with($lifetime)
175+
->will($this->returnSelf());
167176
$cookieMetadata->expects($this->once())
168177
->method('setPath')
169178
->with($path)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
<section id="dev" translate="label" type="text" sortOrder="920" showInDefault="1" showInWebsite="1" showInStore="1">
109109
<label>Developer</label>
110110
<tab>advanced</tab>
111-
<resource>Magento_Backend::dev</resource>
111+
<resource>Magento_Config::dev</resource>
112112
<group id="debug" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
113113
<label>Debug</label>
114114
<field id="template_hints_storefront" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
@@ -408,7 +408,7 @@
408408
<section id="web" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
409409
<label>Web</label>
410410
<tab>general</tab>
411-
<resource>Magento_Backend::web</resource>
411+
<resource>Magento_Config::web</resource>
412412
<group id="url" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0">
413413
<label>Url Options</label>
414414
<field id="use_store" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
9+
<update handle="formkey"/>
10+
<body>
11+
<referenceContainer name="content">
12+
<block class="Magento\Backend\Block\Widget\Container" name="adminhtml_admin_delete_confirm" template="Magento_Backend::admin/delete_confirm.phtml"/>
13+
</referenceContainer>
14+
</body>
15+
</page>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
9+
<update handle="formkey"/>
10+
<body>
11+
<referenceContainer name="content">
12+
<block class="Magento\Backend\Block\System\Store\Edit" name="adminhtml_admin_save_confirm" template="Magento_Backend::admin/save_confirm.phtml"/>
13+
</referenceContainer>
14+
</body>
15+
</page>

0 commit comments

Comments
 (0)