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:
authormattab <matthieu.aubry@gmail.com>2014-03-29 09:10:52 +0400
committermattab <matthieu.aubry@gmail.com>2014-03-29 09:10:52 +0400
commitf30cf2077e026fb5536b110ace8be95eae209b0e (patch)
tree86adaa365da32a103cd1122aff38cf1622745bef /core/SettingsServer.php
parent103f5daad5500e91afd7c78513f448604de2012a (diff)
Fixes #4924: in Tracker mode, do not check for permission when getting/setting plugin settings.
Diffstat (limited to 'core/SettingsServer.php')
-rw-r--r--core/SettingsServer.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/SettingsServer.php b/core/SettingsServer.php
index d1d5142ec7..7223d3e304 100644
--- a/core/SettingsServer.php
+++ b/core/SettingsServer.php
@@ -31,6 +31,18 @@ class SettingsServer
&& Piwik::hasUserSuperUserAccess();
}
+
+ /**
+ * Returns true if the current request is a Tracker request.
+ *
+ * @return bool true if the current request is a Tracking API Request (ie. piwik.php)
+ */
+ public static function isTrackerApiRequest()
+ {
+ return !empty($GLOBALS['PIWIK_TRACKER_MODE']);
+ }
+
+
/**
* Returns `true` if running on Microsoft IIS 7 (or above), `false` if otherwise.
*