Merge pull request #180 from annando/master

statistics: Network name and all posts
pull/185/head^2
tobiasd 2014-02-02 13:22:40 -08:00
commit 7f02adb55b
1 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ function statistics_json_init() {
$statistics = array( $statistics = array(
"name" => $a->config["sitename"], "name" => $a->config["sitename"],
"network" => FRIENDICA_PLATFORM,
"version" => FRIENDICA_VERSION, "version" => FRIENDICA_VERSION,
"registrations_open" => ($a->config['register_policy'] != 0), "registrations_open" => ($a->config['register_policy'] != 0),
"total_users" => get_config('statistics_json','total_users'), "total_users" => get_config('statistics_json','total_users'),
@ -90,7 +91,7 @@ function statistics_json_cron($a,$b) {
set_config('statistics_json','active_users_monthly', $active_users_monthly); set_config('statistics_json','active_users_monthly', $active_users_monthly);
} }
$posts = q("SELECT COUNT(*) AS local_posts FROM `item` WHERE `wall` AND id=parent"); $posts = q("SELECT COUNT(*) AS local_posts FROM `item` WHERE `wall` left(body, 6) != '[share'");
if (!is_array($posts)) if (!is_array($posts))
$local_posts = -1; $local_posts = -1;