summaryrefslogtreecommitdiff
path: root/includes/pages/guest_stats.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-01-21 23:07:20 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-21 23:07:20 +0100
commit8506d6d27e3b926521007064abcdcc2f69c6aa06 (patch)
tree4c0207871b3e9a831f8a619ff095ad71adb66f05 /includes/pages/guest_stats.php
parent740026a9de6cba73c4e77aba78950d0a791b6b62 (diff)
Refactoring: Config cleanup / moved to class
Diffstat (limited to 'includes/pages/guest_stats.php')
-rw-r--r--includes/pages/guest_stats.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/pages/guest_stats.php b/includes/pages/guest_stats.php
index 4add3e97..6b6f0572 100644
--- a/includes/pages/guest_stats.php
+++ b/includes/pages/guest_stats.php
@@ -4,10 +4,10 @@ use Engelsystem\Database\DB;
function guest_stats()
{
- global $api_key;
+ $apiKey = config('api_key');
if (isset($_REQUEST['api_key'])) {
- if ($_REQUEST['api_key'] == $api_key) {
+ if ($_REQUEST['api_key'] == $apiKey && !empty($apiKey)) {
$stats = [];
list($user_count) = DB::select('SELECT count(*) AS `user_count` FROM `User`');