summaryrefslogtreecommitdiff
path: root/includes/pages/guest_stats.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-07-18 21:38:53 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-07-19 11:44:16 +0200
commit3a1e4602492cec1c8f3d2aabab2c866022f43bf1 (patch)
treec367c1ce15f957a1e9a0879b875e8d635883280e /includes/pages/guest_stats.php
parent04217834fa4e6f94fec0836a80ea5526b8ebc9bc (diff)
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`');