summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics_reporting/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-01-19 13:09:33 +0100
committerSimon Rettberg2017-01-19 13:09:33 +0100
commitb5fd09f393b08f09a72f2851dc7b24e683fc9cfc (patch)
tree4bfe83912971b8439aa00949fe972e6cac2c9a60 /modules-available/statistics_reporting/page.inc.php
parent[statistics_reporting] intdiv() is PHP7 only (diff)
downloadslx-admin-b5fd09f393b08f09a72f2851dc7b24e683fc9cfc.tar.gz
slx-admin-b5fd09f393b08f09a72f2851dc7b24e683fc9cfc.tar.xz
slx-admin-b5fd09f393b08f09a72f2851dc7b24e683fc9cfc.zip
[statistics_reporting] Check if user is logged in in doAjax()
Diffstat (limited to 'modules-available/statistics_reporting/page.inc.php')
-rw-r--r--modules-available/statistics_reporting/page.inc.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php
index 1428848a..27d478dc 100644
--- a/modules-available/statistics_reporting/page.inc.php
+++ b/modules-available/statistics_reporting/page.inc.php
@@ -46,11 +46,15 @@ class Page_Statistics_Reporting extends Page
protected function doAjax()
{
- $this->action = Request::any('action', false, 'string');
- if ($this->action === 'setReporting') {
- Property::set("reportingStatus", Request::get('reporting', "on", 'string'));
- } elseif ($this->action === 'getReporting') {
- echo Property::get("reportingStatus", "on");
+ if (!User::isLoggedIn()) {
+ echo "No.";
+ } else {
+ $this->action = Request::any('action', false, 'string');
+ if ($this->action === 'setReporting') {
+ Property::set("reportingStatus", Request::get('reporting', "on", 'string'));
+ } elseif ($this->action === 'getReporting') {
+ echo Property::get("reportingStatus", "on");
+ }
}
}
}