Skip to content

Commit 121541e

Browse files
committed
Merge branch 'develop' into MAGETWO-70279
2 parents 2ef8bce + aa4ae30 commit 121541e

File tree

495 files changed

+22530
-2736
lines changed

Some content is hidden

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

495 files changed

+22530
-2736
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/Authorizenet/Model/Directpost.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,11 @@ protected function processPaymentFraudStatus(\Magento\Sales\Model\Order\Payment
744744
return $this;
745745
}
746746

747-
$payment->setIsFraudDetected(true);
747+
$fdsFilterAction = (string)$fraudDetailsResponse->getFdsFilterAction();
748+
if ($this->fdsFilterActionIsReportOnly($fdsFilterAction) === false) {
749+
$payment->setIsFraudDetected(true);
750+
}
751+
748752
$payment->setAdditionalInformation('fraud_details', $fraudData);
749753
} catch (\Exception $e) {
750754
//this request is optional
@@ -989,4 +993,16 @@ private function getPsrLogger()
989993
}
990994
return $this->psrLogger;
991995
}
996+
997+
/**
998+
* Checks if filter action is Report Only. Transactions that trigger this filter are processed as normal,
999+
* but are also reported in the Merchant Interface as triggering this filter.
1000+
*
1001+
* @param string $fdsFilterAction
1002+
* @return bool
1003+
*/
1004+
private function fdsFilterActionIsReportOnly($fdsFilterAction)
1005+
{
1006+
return $fdsFilterAction === (string)$this->dataHelper->getFdsFilterActionLabel('report');
1007+
}
9921008
}

app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
140140
*/
141141
order.addExcludedPaymentMethod('<?= /* @noEscape */ $code ?>');
142142

143-
<?php if (!$block->isAjaxRequest()): ?>
144-
document.observe('dom:loaded', function(){
145-
<?php endif; ?>
146-
147143
directPostModel = new directPost(
148144
'<?= /* @noEscape */ $code ?>',
149145
'directpost-iframe',
@@ -153,9 +149,5 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
153149
'<?= $block->escapeUrl($block->getUrl('*/*/save', [
154150
'_secure' => $block->getRequest()->isSecure()
155151
]));?>');
156-
157-
<?php if (!$block->isAjaxRequest()): ?>
158-
});
159-
<?php endif; ?>
160152
});
161153
</script>

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">

0 commit comments

Comments
 (0)