X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=statistics_json%2Fstatistics_json.php;h=87ffdb00399e2d1af439713d6e509858586ebcfa;hb=9f18d7e6ded53ce9338c624ed4228315581fb217;hp=8ce6a35f02429136c571978212e4e6b77043175e;hpb=df55183216492f4cab28508af93cb718363fb3e0;p=friendica-addons.git diff --git a/statistics_json/statistics_json.php b/statistics_json/statistics_json.php index 8ce6a35f..87ffdb00 100644 --- a/statistics_json/statistics_json.php +++ b/statistics_json/statistics_json.php @@ -2,9 +2,10 @@ /** * Name: Statistics - * Description: Generates some statistics for http://pods.jasonrobinson.me/ - * Version: 0.1 + * Description: Generates some statistics for http://the-federation.info/ + * Version: 0.2 * Author: Michael Vogel + * Status: Unsupported */ function statistics_json_install() { @@ -29,7 +30,7 @@ function statistics_json_init() { $statistics = array( "name" => $a->config["sitename"], "network" => FRIENDICA_PLATFORM, - "version" => FRIENDICA_VERSION, + "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION, "registrations_open" => ($a->config['register_policy'] != 0), "total_users" => get_config('statistics_json','total_users'), "active_users_halfyear" => get_config('statistics_json','active_users_halfyear'), @@ -125,7 +126,7 @@ function statistics_json_cron($a,$b) { set_config('statistics_json','active_users_monthly', $active_users_monthly); } - $posts = q("SELECT COUNT(*) AS local_posts FROM `item` WHERE `wall` AND left(body, 6) != '[share'"); + $posts = q("SELECT COUNT(*) AS local_posts FROM `item` WHERE `wall` AND `uid` != 0 AND `id` = `parent` AND left(body, 6) != '[share'"); if (!is_array($posts)) $local_posts = -1; @@ -137,7 +138,7 @@ function statistics_json_cron($a,$b) { logger('statistics_json_cron: local_posts: '.$local_posts, LOGGER_DEBUG); // Now trying to register - $url = "http://pods.jasonrobinson.me/register/".$a->get_hostname(); + $url = "http://the-federation.info/register/".$a->get_hostname(); logger('statistics_json_cron: registering url: '.$url, LOGGER_DEBUG); $ret = fetch_url($url); logger('statistics_json_cron: registering answer: '.$ret, LOGGER_DEBUG);