Cleanup /format pre-move
This commit is contained in:
parent
f77632378b
commit
56ee734b00
85 changed files with 522 additions and 581 deletions
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file mod/statistics_json.php
|
||||
*/
|
||||
|
@ -7,21 +8,21 @@ require_once("include/plugin.php");
|
|||
|
||||
function statistics_json_init(App $a) {
|
||||
|
||||
if (!get_config("system", "nodeinfo")) {
|
||||
http_status_exit(404);
|
||||
killme();
|
||||
}
|
||||
if (!get_config("system", "nodeinfo")) {
|
||||
http_status_exit(404);
|
||||
killme();
|
||||
}
|
||||
|
||||
$statistics = array(
|
||||
"name" => $a->config["sitename"],
|
||||
"network" => FRIENDICA_PLATFORM,
|
||||
"version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION,
|
||||
"registrations_open" => ($a->config['register_policy'] != 0),
|
||||
"total_users" => get_config('nodeinfo','total_users'),
|
||||
"active_users_halfyear" => get_config('nodeinfo','active_users_halfyear'),
|
||||
"active_users_monthly" => get_config('nodeinfo','active_users_monthly'),
|
||||
"local_posts" => get_config('nodeinfo','local_posts')
|
||||
);
|
||||
"name" => $a->config["sitename"],
|
||||
"network" => FRIENDICA_PLATFORM,
|
||||
"version" => FRIENDICA_VERSION . "-" . DB_UPDATE_VERSION,
|
||||
"registrations_open" => ($a->config['register_policy'] != 0),
|
||||
"total_users" => get_config('nodeinfo', 'total_users'),
|
||||
"active_users_halfyear" => get_config('nodeinfo', 'active_users_halfyear'),
|
||||
"active_users_monthly" => get_config('nodeinfo', 'active_users_monthly'),
|
||||
"local_posts" => get_config('nodeinfo', 'local_posts')
|
||||
);
|
||||
|
||||
$statistics["services"] = array();
|
||||
$statistics["services"]["appnet"] = plugin_enabled("appnet");
|
||||
|
@ -53,7 +54,7 @@ function statistics_json_init(App $a) {
|
|||
$statistics["wordpress"] = $statistics["services"]["wordpress"];
|
||||
|
||||
header("Content-Type: application/json");
|
||||
echo json_encode($statistics, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
||||
logger("statistics_init: printed ".print_r($statistics, true), LOGGER_DATA);
|
||||
echo json_encode($statistics, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
logger("statistics_init: printed " . print_r($statistics, true), LOGGER_DATA);
|
||||
killme();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue