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:
Diffstat (limited to 'plugins/Marketplace/Input/Mode.php')
-rw-r--r--plugins/Marketplace/Input/Mode.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/Marketplace/Input/Mode.php b/plugins/Marketplace/Input/Mode.php
new file mode 100644
index 0000000000..12ec883b3f
--- /dev/null
+++ b/plugins/Marketplace/Input/Mode.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+
+namespace Piwik\Plugins\Marketplace\Input;
+use Piwik\Common;
+
+/**
+ */
+class Mode
+{
+
+ public function getMode()
+ {
+ $mode = Common::getRequestVar('mode', 'admin', 'string');
+
+ if (!in_array($mode, array('user', 'admin'))) {
+ $mode = 'admin';
+ }
+
+ return $mode;
+ }
+
+}