Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2018-05-15 23:09:18 +0300
committerGitHub <noreply@github.com>2018-05-15 23:09:18 +0300
commit8caf15258a35b3e6c4ee2bef63bc529dcfab7b8a (patch)
treeabdf7e934de54087507468bc05d7a4d948d62a29 /plugins
parent58f2357a94b3ab64248a061c61ca64753e46fb38 (diff)
Add new method to detect if root request is an API request (#12913)
* Add new method to detect if root request is an API request * Update CHANGELOG.md * add docs
Diffstat (limited to 'plugins')
-rw-r--r--plugins/API/API.php8
-rw-r--r--plugins/PrivacyManager/templates/gdprOverview.twig2
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php
index c4553d81b3..dad8a602e2 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -749,10 +749,16 @@ class Plugin extends \Piwik\Plugin
public function registerEvents()
{
return array(
- 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles'
+ 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
+ 'Platform.initialized' => 'detectIsApiRequest'
);
}
+ public function detectIsApiRequest()
+ {
+ Request::setIsRootRequestApiRequest(Request::isApiRequest($request = null));
+ }
+
public function getStylesheetFiles(&$stylesheets)
{
$stylesheets[] = "plugins/API/stylesheets/listAllAPI.less";
diff --git a/plugins/PrivacyManager/templates/gdprOverview.twig b/plugins/PrivacyManager/templates/gdprOverview.twig
index 790b76f1d3..2ed97438ef 100644
--- a/plugins/PrivacyManager/templates/gdprOverview.twig
+++ b/plugins/PrivacyManager/templates/gdprOverview.twig
@@ -14,6 +14,8 @@
</p>
</div>
+ {{ postEvent('Template.afterGDPROverviewIntro') }}
+
<div piwik-content-block content-title="GDPR checklists">
<p>If you are processing personal data of European citizens through Matomo, even if your company is located outside Europe, you need to fulfill GDPR obligations and this guide will help you.
<br /><br />