forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,194 changed files
with
82,124 additions
and
14,891 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,5 @@ | |
"Magento\\AdminAnalytics\\": "" | ||
} | ||
}, | ||
"version": "100.3.1" | ||
"version": "100.3.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd"> | ||
<policies> | ||
<policy id="script-src"> | ||
<values> | ||
<value id="adobedtm" type="host">assets.adobedtm.com</value> | ||
</values> | ||
</policy> | ||
</policies> | ||
</csp_whitelist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,5 +27,5 @@ | |
"Magento\\AdminNotification\\": "" | ||
} | ||
}, | ||
"version": "100.3.4" | ||
"version": "100.3.5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd"> | ||
<policies> | ||
<policy id="img-src"> | ||
<values> | ||
<value id="commerce_widgets" type="host">widgets.magentocommerce.com</value> | ||
</values> | ||
</policy> | ||
</policies> | ||
</csp_whitelist> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
app/code/Magento/Analytics/Setup/Patch/Data/ActivateDataCollection.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Magento\Analytics\Setup\Patch\Data; | ||
|
||
use Magento\Analytics\Model\Config\Backend\CollectionTime; | ||
use Magento\Analytics\Model\SubscriptionStatusProvider; | ||
use Magento\Framework\App\Config\ScopeConfigInterface; | ||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Framework\Setup\Patch\DataPatchInterface; | ||
|
||
/** | ||
* Activate data collection mechanism | ||
*/ | ||
class ActivateDataCollection implements DataPatchInterface | ||
{ | ||
/** | ||
* @var ScopeConfigInterface | ||
*/ | ||
private $scopeConfig; | ||
|
||
/** | ||
* @var SubscriptionStatusProvider | ||
*/ | ||
private $subscriptionStatusProvider; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $analyticsCollectionTimeConfigPath = 'analytics/general/collection_time'; | ||
|
||
/** | ||
* @var CollectionTime | ||
*/ | ||
private $collectionTimeBackendModel; | ||
|
||
/** | ||
* @param ScopeConfigInterface $scopeConfig | ||
* @param SubscriptionStatusProvider $subscriptionStatusProvider | ||
* @param CollectionTime $collectionTimeBackendModel | ||
*/ | ||
public function __construct( | ||
ScopeConfigInterface $scopeConfig, | ||
SubscriptionStatusProvider $subscriptionStatusProvider, | ||
CollectionTime $collectionTimeBackendModel | ||
) { | ||
$this->scopeConfig = $scopeConfig; | ||
$this->subscriptionStatusProvider = $subscriptionStatusProvider; | ||
$this->collectionTimeBackendModel = $collectionTimeBackendModel; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
* | ||
* @throws LocalizedException | ||
*/ | ||
public function apply() | ||
{ | ||
$subscriptionStatus = $this->subscriptionStatusProvider->getStatus(); | ||
$isCollectionProcessActivated = $this->scopeConfig->getValue(CollectionTime::CRON_SCHEDULE_PATH); | ||
if ($subscriptionStatus !== $this->subscriptionStatusProvider->getStatusForDisabledSubscription() | ||
&& !$isCollectionProcessActivated | ||
) { | ||
$this->collectionTimeBackendModel | ||
->setValue($this->scopeConfig->getValue($this->analyticsCollectionTimeConfigPath)); | ||
$this->collectionTimeBackendModel->setPath($this->analyticsCollectionTimeConfigPath); | ||
$this->collectionTimeBackendModel->afterSave(); | ||
} | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getAliases() | ||
{ | ||
return []; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public static function getDependencies() | ||
{ | ||
return [ | ||
PrepareInitialConfig::class, | ||
]; | ||
} | ||
} |
Oops, something went wrong.