]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Nodeinfo.php
Merge pull request #12591 from MrPetovan/task/2023-licence
[friendica.git] / src / Model / Nodeinfo.php
index b10572612d7d2c7a87b4af48505dafd59b0bd361..0fbaf93c7e703e67ab1124b77b6140e0ee99b7b6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -80,19 +80,17 @@ class Nodeinfo
                $config = DI::config();
 
                $usage = new stdClass();
-               $usage->users = [];
+               $usage->users = new \stdClass;
 
                if (!empty($config->get('system', 'nodeinfo'))) {
-                       $usage->users = [
-                               'total'          => intval($config->get('nodeinfo', 'total_users')),
-                               'activeHalfyear' => intval($config->get('nodeinfo', 'active_users_halfyear')),
-                               'activeMonth'    => intval($config->get('nodeinfo', 'active_users_monthly'))
-                       ];
+                       $usage->users->total = intval($config->get('nodeinfo', 'total_users'));
+                       $usage->users->activeHalfyear = intval($config->get('nodeinfo', 'active_users_halfyear'));
+                       $usage->users->activeMonth = intval($config->get('nodeinfo', 'active_users_monthly'));
                        $usage->localPosts = intval($config->get('nodeinfo', 'local_posts'));
                        $usage->localComments = intval($config->get('nodeinfo', 'local_comments'));
 
                        if ($version2) {
-                               $usage->users['activeWeek'] = intval($config->get('nodeinfo', 'active_users_weekly'));
+                               $usage->users->activeWeek = intval($config->get('nodeinfo', 'active_users_weekly'));
                        }
                }