summaryrefslogtreecommitdiff
path: root/includes/pages/guest_stats.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-07-20 18:34:19 +0200
committerGitHub <noreply@github.com>2017-07-20 18:34:19 +0200
commit37d4edcd9ace5021b6eb02761a9c3865c5607f33 (patch)
tree16c0da4cd2d9c6c10f5d5e02c1b02bd0986636c2 /includes/pages/guest_stats.php
parent9b3f6f557a127fef16be267c26f8239dc1c22126 (diff)
parentb7ebb05b8e71b391b6b029fceb5a2d00ff27004c (diff)
Merge pull request #328 from MyIgel/master
Changed $_GET, $_POST and $_REQUEST to use the Request object
Diffstat (limited to 'includes/pages/guest_stats.php')
-rw-r--r--includes/pages/guest_stats.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/pages/guest_stats.php b/includes/pages/guest_stats.php
index 6b6f0572..8aa6f740 100644
--- a/includes/pages/guest_stats.php
+++ b/includes/pages/guest_stats.php
@@ -5,9 +5,10 @@ use Engelsystem\Database\DB;
function guest_stats()
{
$apiKey = config('api_key');
+ $request = request();
- if (isset($_REQUEST['api_key'])) {
- if ($_REQUEST['api_key'] == $apiKey && !empty($apiKey)) {
+ if ($request->has('api_key')) {
+ if (!empty($apiKey) && $request->input('api_key') == $apiKey) {
$stats = [];
list($user_count) = DB::select('SELECT count(*) AS `user_count` FROM `User`');